Not applicable
Sep 07, 2016
11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 07, 2016
11:58 PM
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
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
1 Reply
Not applicable
Sep 08, 2016
01:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 08, 2016
01:44 AM
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));
}
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));
}