Another step closer to world domination

Fast update from last post. I got ChaN’s FAT32 working and can read and write files at 200kbytes/second. Not too shabby.

With the FAT32 behind me, I set myself the goal of connecting my uBlox LEA-6H module to my ARM processor this weekend. As it turns out, I missed my goal, but I got awfully close.

The reason I failed was that I decided I really needed an sprintf routine. Somehow my Yagarto system libraries do not include sprintf. I think because they do not include malloc/sbrk. I was unwilling to write the memory allocation interface, so I spent a day and rewrote my version of snprintf. It does %d, %u, %c, %f, and the always useful %%. It also support the width, and other options. Not terribly fast yet, but the basics are in place.

This allowed me to gut my code of awful debug code I was using to print bits of critical information. The code is much cleaner now.

I also had to write a device driver for the serial ports. I have been using the DBGU serial port on the Atmel SAM7 for a debugging serial port. Works great, but I needed to modify it to support the US0 and US1 serial ports. Luckily they are all nearly identical and I was able to modify the code such that the basic routines (read, write, configure,…) now simply take an argument for the port to use. But till just recently I have been tearing my hair out as to why it was not working. As it was getting close to bed, I decided to stop for the night and check in all my code into GIT. As a comment, I added all the possibilities as to why it was not working. As a joke I said “and perhaps I did not set the “make it work” bit”. As soon as I wrote that, I realized that that is exactly what I forgot to do. I failed to turn on the clock to the other UARTS. I set one register, and poof it works.

My goal for this week is to mechanically and electrically mount the GPS module to my test board and start getting the software to parse the binary data stream. I already have the code from another project to do this, so it should not be to hard to get that up and running. Perhaps by the weekend I will be getting the data and writing it to my new SD card interface.

This entry was posted in ARM, AVC. Bookmark the permalink.