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.

MSP430, USB: Use static buffer on sendData_inBackground() or USBHID_sendData()

Other Parts Discussed in Thread: MSP430F5528

I'm currently implement my HID interface on MSP430F5528. I detected an undocumented requirement on sendData_inBackground() and USBHID_sendData().

Both function require that the parameter dataBuf (or data) are present for a while after calling the function. Best is to use a static buffer.

As far as I detected copies USBHID_sendData the content in interrupt (DMA?) after being called. If you use a local object from stack (as I did) then some parts might be overwritten by succeding functions while USBHID_sendData is still copying (from a corrupt stack).

Regards

Guenther

 

**Attention** This is a public forum