Go to advanced search

by bjraval
Fri Mar 29, 2013 5:47 pm
Forum: C/C++
Topic: UART: Incoming data is not received
Replies: 6
Views: 2989

Re: UART: Incoming data is not received

How did you fix this?
I'm facing the same problem...


Thanks,
Brijen
by bjraval
Tue Feb 05, 2013 6:33 pm
Forum: Bare metal, Assembly language
Topic: Interfacing a JPEG TTL interface camera to the mini uart
Replies: 6
Views: 2756

Re: Interfacing a JPEG TTL interface camera to the mini uart

Thank you everyone for the replies.
I was wondering if I could you a MUX to select between either debugging console or the camera?

- Brijen
by bjraval
Mon Jan 28, 2013 4:41 pm
Forum: Bare metal, Assembly language
Topic: Interfacing a JPEG TTL interface camera to the mini uart
Replies: 6
Views: 2756

Interfacing a JPEG TTL interface camera to the mini uart

Hello all, I'm trying to interface this JPEG camera (https://www.sparkfun.com/products/10061?) using the mini uart available at the GPIO's. The issue I'm facing here is I have the same mini uart connected to my system and currently being used to print out stuff to help me debugging. When I'm trying ...
by bjraval
Sat Nov 17, 2012 8:39 pm
Forum: Bare metal, Assembly language
Topic: EMMC - can't get READ_RDY
Replies: 22
Views: 7921

Re: EMMC - can't get READ_RDY

Any idea on how to read the sector 0 (Master Boot Record) ??

Thanks,
Brijen
by bjraval
Wed Nov 14, 2012 1:12 am
Forum: Bare metal, Assembly language
Topic: SD card second write produces timeout
Replies: 20
Views: 4652

Re: SD card second write produces timeout

Looking at my code: // Address passed in is byte offset from start of the card. // Address is different depending on the card type. // HC pass address as block # which is address/512. // SC pass address straight through. int blockAddress = sdCard.type == SD_TYPE_2_HC ? (int)(address>>9) : (int)addr...
by bjraval
Mon Nov 12, 2012 6:40 am
Forum: Bare metal, Assembly language
Topic: SD card second write produces timeout
Replies: 20
Views: 4652

Re: SD card second write produces timeout

Hello,
I'm starting to read and write data blocks from the SD card.
It's a silly question but what block addresses should I be writing while sending the READ_SINGLE_BLOCK command?

Can someone give me an overview of how read and write block functions would work?

-Brijen
by bjraval
Mon Nov 05, 2012 6:41 am
Forum: Bare metal, Assembly language
Topic: SD card access
Replies: 26
Views: 7222

Re: SD card access

Hello I'm testing *pRESP0 & 0x80000000 If you don't read RESP0, it will be shifted later to RESP1, RESP1 to RESP2, ... as in a queue of 16 bytes. For testing, you can loop for a long time (2 or 3 seconds). For me, I'm looping only 5 or 10 mSec and restart to reset and CMD 0 to check if the card is ...
by bjraval
Mon Nov 05, 2012 6:40 am
Forum: Bare metal, Assembly language
Topic: EMMC - can't get READ_RDY
Replies: 22
Views: 7921

Re: EMMC - can't get READ_RDY

Most common problem here seems to be that the ACMD41 typically takes a significant time - 100's of milliseconds. From what you list above, you are getting the response for the ACMD41 after the next command - the 00ff8000 response is the card agreeing on the voltage levels which you sent in the ACMD...
by bjraval
Sat Nov 03, 2012 11:09 pm
Forum: Bare metal, Assembly language
Topic: SD card access
Replies: 26
Views: 7222

Re: SD card access

Hello, When you have an error with CMD 41, you must resend CMD 55 and CMD 41, not only CMD41. The command is ACMD41 and contain CMD 55 AND CMD 41 I think, in your code, you resend only CMD41. Philippe Thanks Philippe, What I have a doubt is 1. is my CMD55 RESP0 right? 2. For CMD41 which high bit sh...
by bjraval
Fri Nov 02, 2012 1:30 am
Forum: Bare metal, Assembly language
Topic: EMMC - can't get READ_RDY
Replies: 22
Views: 7921

Re: EMMC - can't get READ_RDY

Here is what I use to initialize my SD card void sd_init() { unsigned int m; unsigned int test; PUT32(CONTROL0,0x00100000); PUT32(CONTROL1,0x070F0F27); PUT32(CONTROL2,0x00000000); do { m = GET32(CONTROL1); test = m & 0x10000000; }while(test!=0); //Waiting it to reset PUT32(CONTROL0,0x00100000); PUT3...
by bjraval
Fri Nov 02, 2012 1:29 am
Forum: Bare metal, Assembly language
Topic: SD card access
Replies: 26
Views: 7222

Re: SD card access

Here is what I use to initialize my SD card void sd_init() { unsigned int m; unsigned int test; PUT32(CONTROL0,0x00100000); PUT32(CONTROL1,0x070F0F27); PUT32(CONTROL2,0x00000000); do { m = GET32(CONTROL1); test = m & 0x10000000; }while(test!=0); //Waiting it to reset PUT32(CONTROL0,0x00100000); PUT3...
by bjraval
Wed Oct 31, 2012 4:07 pm
Forum: Bare metal, Assembly language
Topic: SD card access
Replies: 26
Views: 7222

Re: SD card access

I can certainly try to help with specific questions, although I'm not the expert in this stuff. I've managed to get as far as basic reading and writing to the SD card, although not without my own unresolved issues. Hello, I'm still stuck at Initializing the SD card. If its fine can I borrow your co...
by bjraval
Sat Oct 27, 2012 3:26 am
Forum: Bare metal, Assembly language
Topic: SD card access
Replies: 26
Views: 7222

Re: SD card access

Well not entirely sure what I changed ^^ I added longer delays between the ACMD41 calls and now I'm getting the top bit set (hooray!). Getting a successful response to CMD2 now so hopefully I can make some progress. Thanks for your responses :) I have been trying to set up the sd card and initializ...
by bjraval
Sat Oct 27, 2012 1:04 am
Forum: Bare metal, Assembly language
Topic: Interfacing JPEG TTL Camera and storing images on SD card?
Replies: 3
Views: 1703

Re: Interfacing JPEG TTL Camera and storing images on SD car

Thanks David,
Aware of any links or sample codes I can borrow to initialize the SD card? I came across a few posts here but they are all confusing me.

Update - There is good amount of documentation for the camera, so things over there looks good to me :)

Thanks,
Brijen
by bjraval
Wed Oct 24, 2012 9:50 pm
Forum: Bare metal, Assembly language
Topic: Interfacing JPEG TTL Camera and storing images on SD card?
Replies: 3
Views: 1703

Interfacing JPEG TTL Camera and storing images on SD card?

Since the last couple of months thanks to all the forum members I have a basic knowledge about bare metal programming the Raspberry Pi. Next I was thinking of interfacing this camera (https://www.sparkfun.com/products/10061) and store images on the SD card. Does it look too ambitious? Can anyone gui...
by bjraval
Wed Oct 24, 2012 9:46 pm
Forum: Bare metal, Assembly language
Topic: Unable to port newlib
Replies: 10
Views: 2942

Re: Unable to port newlib

I just added a quick newlib example to my repo. Newlib building clean first try was a pleasant surprise based on past experience. I used to use newlib a lot for bare metal because I really wanted that printf(). but learned it wasnt worth the trouble (still isnt). I replace the crt0.S, libcfunc.c an...
by bjraval
Tue Oct 23, 2012 1:08 am
Forum: Bare metal, Assembly language
Topic: Unable to port newlib
Replies: 10
Views: 2942

Re: Unable to port newlib

This is my serial_init( ) code void serial_init() { unsigned int ra; PUT32(AUX_ENABLES,1); PUT32(AUX_MU_IER_REG,0); PUT32(AUX_MU_CNTL_REG,0); PUT32(AUX_MU_LCR_REG,3); PUT32(AUX_MU_MCR_REG,0); PUT32(AUX_MU_IER_REG,0); PUT32(AUX_MU_IIR_REG,0xC6); PUT32(AUX_MU_BAUD_REG,270); ra=GET32(GPFSEL1); ra&=~(7<...
by bjraval
Mon Oct 22, 2012 6:32 am
Forum: Bare metal, Assembly language
Topic: Unable to port newlib
Replies: 10
Views: 2942

Re: Unable to port newlib

Sorry my bad. Here's the implementation of _write ( ) int _write(int file, char *ptr, int len) { /*Adding a delay here fixes the issue*/ for(ra=0;ra<len;ra++) print_ch(*ptr++); return len; } void print_ch(char ch) { while((GET32(AUX_MU_LSR_REG)&0x20) == 0); PUT32(AUX_MU_IO_REG,ch); } I will make sur...
by bjraval
Mon Oct 22, 2012 12:43 am
Forum: Bare metal, Assembly language
Topic: Unable to port newlib
Replies: 10
Views: 2942

Re: Unable to port newlib

Thanks for your replies I hadn't implemented the _read( ) and _write( ) functions properly. It works now. Also, even after doing so I am seeing a weird behavior. Everything prints perfectly if I have a small delay function in the _write( ) function, otherwise it doesn't print everything I want. Any ...
by bjraval
Thu Oct 18, 2012 11:47 pm
Forum: Bare metal, Assembly language
Topic: Unable to port newlib
Replies: 10
Views: 2942

Unable to port newlib

I am trying to use Newlib in ARM bare metal programming but so far haven't managed to get any success. I followed the steps give here (http://balau82.wordpress.com/2010/12/16/using-newlib-in-arm-bare-metal-programs/) The project builds but seems to do nothing when I have a simple code to print "Hell...
by bjraval
Thu Oct 18, 2012 5:34 am
Forum: Bare metal, Assembly language
Topic: getting the mini uart to work
Replies: 14
Views: 4652

Re: getting the mini uart to work

Thanks David for the quick replies.. I have tried building and running the uart01 and uart02 examples, but minicom doesn't show anything... Then i came across this (https://github.com/richcole/RaspberryPi), this strangely seemed to work fine for me. But I don't see much of a difference there. And I ...
by bjraval
Thu Oct 18, 2012 1:08 am
Forum: Bare metal, Assembly language
Topic: getting the mini uart to work
Replies: 14
Views: 4652

Re: getting the mini uart to work

What would you suggest in such a case?
by bjraval
Wed Oct 17, 2012 6:03 pm
Forum: Bare metal, Assembly language
Topic: getting the mini uart to work
Replies: 14
Views: 4652

Re: getting the mini uart to work

yep I am able to build and run the blinker01-04 but blinker05 does nothing for me. I haven't made any changes in your codes yet, so not sure if this is the issue only with me or someone else also is facing this. I also tried working with the bootloader03 code, loaded the kernel.img on the SD card. U...
by bjraval
Tue Oct 16, 2012 5:31 am
Forum: Bare metal, Assembly language
Topic: getting the mini uart to work
Replies: 14
Views: 4652

Re: getting the mini uart to work

I tried executing the uart01 project by David, but at the Tx GPIO I seem to get nothing but constant 3.3v Also when connected to minicom on my system by using this https://www.sparkfun.com/products/9717 I dont get anything on the screen, and minicom always shows offline. Any idea what might be going...
by bjraval
Sun Oct 07, 2012 4:07 am
Forum: Bare metal, Assembly language
Topic: Interrupt handlers
Replies: 3
Views: 3370

Re: Interrupt handlers

I tried running the blinker05 example but nothing happens to the OK LED. Am I doing something wrong?
I have been trying to set up a vector table but haven't been able to do so till now.

Go to advanced search