It is currently Tue Jul 22, 2014 4:31 pm


Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: embedded linux
PostPosted: Mon Jul 09, 2012 2:19 pm 

Joined: Mon Jul 09, 2012 2:12 pm
Posts: 1
I'm looking for some advice on an embedded Linux project.
We're transmitting 1352 bytes of data from a master device every 1.5ms. The SPI clock is around 33MHz so the data is coming in quite fast.
I've written a simple kernel module that polls the SPI registers and reads the data 1 byte at a time. This works fairly well, but I'm missing bytes once in a while due to other interrupts that are occurring. If I disable one of the high res timer interrupts and the Ethernet interrupt, I get all of the data. I verify a valid packet by toggling an I/O line.
The problem is that the loop is hogging all of the CPU time and not giving time to the other processes that need to send out the data over our UDP socket. If I use the DMA controller to receive SPI data, will it help us in any way? It takes about 700uS to receive the 1352 bytes of data so we have around 850uS to get the data out or have the capability to receive SPI data while sending out the UDP data.
Any thoughts or suggestions?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB