This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI1_TRANSIT problem

Hello,
I realized a few weeks ago a code that works on a nucleo card with the following RF module X-NUCLEO-IDS01A4, this one contains SPSGRF-915. I have now adapted this program for a prototype containing the SPSGRF-868. During the initialization of the RF module, the program remains blocked on a step.
Here is the problematic function:

void SPI1_Transmit(uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
{
        /* start 8-bit transmission with DMA*/
        /* Prepare RX */
        /* (3) Memory address */
        /* (4) Data size */
        DMA1_Channel2->CCR &=~ DMA_CCR_EN;
        DMA1_Channel2->CMAR = (uint32_t)pRxData; /* (3) */
        DMA1_Channel2->CNDTR = Size; /* (4) */
        DMA1_Channel2->CCR |= DMA_CCR_EN;

        /* Prepare TX */
        /* (8) Memory address */
        DMA1_Channel3->CCR &=~ DMA_CCR_EN;
        DMA1_Channel3->CMAR = (uint32_t)pTxData; /* (8) */
        DMA1_Channel3->CNDTR = Size; /* Data size */
        DMA1_Channel3->CCR |= DMA_CCR_EN;

}


Here is the line where the porgram stop

        DMA1_Channel3->CCR |= DMA_CCR_EN;

Someone can help me ?

Parents Reply Children
No data