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.
Part Number: MSP432P401R
Tool/software: Code Composer Studio
Hi,I have three quenstionIs.Could anybody help me?Thanks.
1). I want to use an high-speed external 24bits ADC with MSP432, is there any examples of it?
The ADC "data ready" pin should trigger the DMA to start three hardware SPI communication (because SPI can only transmit one byte each) with a new data and write it to a buffer.
Once the buffer is full, the buffer desternation address is changed (a double-buffered operation).
2).There is an example using the internal 14Bit ADC with DMA PINGPONG mode, but I can't understand the ISR code:The "MSP_EXP432P401RLP_DMAControlTable" is used for what?
__attribute__((ramfunc)) // Requires compiler TI v15.12.1.LTS
void DMA_INT1_IRQHandler(void)
{
#ifdef DEBUG
BITBAND_PERI(P2->OUT, 0) = 1;
#endif
/*
* Switch between primary and alternate bufferes with DMA's PingPong mode
*/
if (MAP_DMA_getChannelAttribute(7) & UDMA_ATTR_ALTSELECT)
{
// MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH7_ADC14, arrayMode,
// (void*) &ADC14->MEM[0],
// (void*)&resultsBuffer[arrayOffset],arraySize);
MSP_EXP432P401RLP_DMAControlTable[7].control =
(MSP_EXP432P401RLP_DMAControlTable[7].control & 0xff000000 ) |
(((BLOCK_SIZE)-1)<<4) | UDMA_MODE_PINGPONG;
currentRawResultPtr = primaryRawADC14;
}
else
{
// MAP_DMA_setChannelTransfer(UDMA_ALT_SELECT | DMA_CH7_ADC14, arrayMode,
// (void*)&ADC14->MEM[0],
// (void*)&resultsBuffer[arrayOffset],arraySize);
MSP_EXP432P401RLP_DMAControlTable[15].control =
(MSP_EXP432P401RLP_DMAControlTable[15].control & 0xff000000 ) |
(((BLOCK_SIZE)-1)<<4) | UDMA_MODE_PINGPONG;
currentRawResultPtr = secondaryRawADC14;
}
#ifdef DEBUG
BITBAND_PERI(P2->OUT, 0) = 0;
#endif
}
3).And There also a thread asking "DMA External Trigger by external ADC data ready-> SPI start", but I still have question about the ISR.(MSP432P401R: DMA External Trigger by external ADC data ready -> SPI Starts - MSP low-power microcontroller...
Should I start the "DMA_CH6_EXTERNALPIN" interrupt or "DMA_CH1_EUSCIB0RX0"?
Thanks a lot.
**Attention** This is a public forum