Hello team -
I am moving this discussion to the MSP430 forums for my customer since it looks like more of a MSP430 issue at this point than a Linux problem.
Please reference this thread in the Linux forum for a full explanation of the issue: http://e2e.ti.com/support/embedded/f/354/p/96505/359792.aspx#359792
Here is where we are:
Hi, we've tried various of the synchronization suggestions.
Currently issuing a USCI reset on the MSP430F235 after every data packet (of 32bytes), combined with a DM365 RS232 send inbetween SPI Master packet sends, in order for it our MSP430 to receive properly. I imagine that SPI1 and RS232 share some SOC hardware functional blocks on the DM365?
So our current (brittle) situation is:
hack 1: Reset MSP430 USCI after every packet.
hack 2: printf() to RS232 before sending every packet.
Getting this far has been a challenge, and it is a brittle system. What other synchronization options could be used?
As a followup question, the MSP430F235 has no DMA functionality, so we have to service each byte on an IRQ. This is quite a lot of IRQs, and the DM365 master has a MINIMUM rate of 600KHz SPI. So when we transmit, we are generating 80KHz IRQs on the poor MSP430. Is there a way to modify the DM365 SPI minimum rate below 600KHz?
I calculate from MSP430F235 spec sheet that it can theoretically support a slave SPI frequency Fs=3.9MHz, but I cannot imagine this rate being serviced by an IRQ per byte. (IRQ's on the MSP430F235 are documented as ~10 cycle latency minimum).
It certainly looks like the MSP430 can't keep up with the data that's being dumped down the pipe. The fact that slowing down the speed that the bytes are being sent at by adding a brief delay seems to validate this.
How did we intend the MSP430F235 to support 3.9MHz on the slave SPI bus? Is this a HW only spec? Is there a way to buffer the data that we're missing?