Other Parts Discussed in Thread: BQ79616
Hi,
My setup is EXP-MSP430FR5994 (external crystal for clock); BQ76600 EVM (UART); custom BQ79616. I am using MSP430 DMA for UART receive. I am running into the race condition outlined below along with solutions tried. The only solution that is helping with consistent BQ initialization is explicit clearing of DMAEN before transmitting data through the UART.
Without explicit clearing of DMAEN in uartSend, BQ initialization sometimes fails after the first throw away read during the BQ auto address sequence.
DMA transfer size variable uartRxLen displays the correct value (and matches the register width);
Content of the local dma receive buffer dma_value has all the receive bytes; but the value in the DMA1SZ register = 1and the DMA ISR does not trigger. I cannot capture the exact moment when the failure happens.
Other solutions tried in the place of clearing DMAEN listed below. None of these helped with the race condition seen:
1. Removing exit from LPM in DMA ISR (no entry into LPM exists)
2. 250 ms BQ measurement time (master timer ISR is currently 125 ms)
3. Receiving the first byte on UART ISR; disable uart Rx ISR and then initiate DMA transfer for remaining receive bytes.
I want pointers on what else I can try to address this problem.
Priya