This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5659: Serial communications over USB may be corrupting A/D reads

Part Number: MSP430F5659


We are using a composite USB interface to transfer serial data and keyboard presses. The serial communications appears to have a 1 ms synchronization on the oscilloscope when an application is not connected on the PC/monitor side. Once the PC application starts, which can simply be a terminal window, the serial communication appears to receive a sync message every 25 microseconds and the message is NAK'ed.

Here is a screen shot from a USB port analyzer:

Our system has an Analog Devices, AD7766, A/D chip that is doing multiple byte reads when the DATA_RDY is set. The suspicion is that the USB traffic is interrupting our A/D data reads and causing data to be misaligned as bytes appear to be missed. The A/D reads are over the SPI bus. There does not appear to be any errata that would cause the SPI bus to be corrupted based on our usage.

Is there a way to control the timing of the synchronization messages from the PC side, or to ACK them from the MSP side? If they are ACK'ed would the synchronization slow down?

  • Hi Sean,

    Sean Stufflebeam said:
    We are using a composite USB interface to transfer serial data and keyboard presses. The serial communications appears to have a 1 ms synchronization on the oscilloscope when an application is not connected on the PC/monitor side. Once the PC application starts, which can simply be a terminal window, the serial communication appears to receive a sync message every 25 microseconds and the message is NAK'ed.

    I'm not sure how the host application determines the period for sending the sync messages. This seems to be called "USB interrupt transfer" and is done by the host. Section 42.3.2 Interrupt Transfers in the MSP430x5xx and MSP430x6xx Family User's Guide discusses the USB device behavior.

    Sean Stufflebeam said:
    Our system has an Analog Devices, AD7766, A/D chip that is doing multiple byte reads when the DATA_RDY is set. The suspicion is that the USB traffic is interrupting our A/D data reads and causing data to be misaligned as bytes appear to be missed. The A/D reads are over the SPI bus. There does not appear to be any errata that would cause the SPI bus to be corrupted based on our usage.

    I think your suspicion is correct. When the USB device is processing the USB packets, the other peripheral interrupts are most likely disabled. Besides slowing down the USB host's interrupt transfer requests, you could consider using another DMA channel to automatically capture the ADC data over SPI.

    DMA for USB and SPI Transfer

    msp430f5529: Question regarding USB data transfer and (GPIO) interrupts

    Regards,

    James

**Attention** This is a public forum