XMC4800 FIFO SPI transmission problem (DAVE API)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello community,

I am using the DAVE API and a XMC4800 with 32 FIFO Transmit and 32 FIFO Receive on USIC2_CH1.

The problem is the following:

When I insert a delay of (approx) 5 us before the "return status" of the function of SPI_MASTER_Transmit, my communication works.

If I don't, then not.


Any idea what could it be?

Thank you very much!

Best regards
Peter
0 Likes
1 Reply
Not applicable
Adding the bold lines to my send functions did the trick!

Could anyone explain to me, why this is necessary (as I am using out of the box DAVE Code !?)

__STATIC_INLINE void XMC_USIC_CH_TXFIFO_PutDataHPCMode(XMC_USIC_CH_t *const channel,
const uint16_t data,
const uint32_t frame_length)
{
//Reset transmit buffer shift flag
USIC2_CH1->PSCR |= (0x01ul << USIC_CH_PSCR_CTSIF_Pos);

channel->IN[frame_length] = data;
while ((((USIC2_CH1->PSR & USIC_CH_PSR_TSIF_Msk) >> USIC_CH_PSR_TSIF_Pos) == 0x00));
}
0 Likes