Not applicable
Nov 02, 2016
03:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 02, 2016
03:07 AM
Hi,
I'm studying the following code (this is the slave transmitter code)
https://www.infineon.com/cms/en/tools/landing/arduino.html
RGB LED Lighting Shield with XMC1202
The code is under Learn more/Documents/Application examples
RGB LED Lighting Shield – XMC1202 Source Code
https://www.infineon.com/dgdl/Infineon-RGB_LED_Lighting_Shield_XMC1202_Source_Code-AE-v06_00-EN.zip?...
My question SRR why not cleared in PSCR? It seems never cleared. Or it cleared by hardware?
I think it should be cleared in USIC0_2_IRQHandler.
I'm studying the following code (this is the slave transmitter code)
https://www.infineon.com/cms/en/tools/landing/arduino.html
RGB LED Lighting Shield with XMC1202
The code is under Learn more/Documents/Application examples
RGB LED Lighting Shield – XMC1202 Source Code
https://www.infineon.com/dgdl/Infineon-RGB_LED_Lighting_Shield_XMC1202_Source_Code-AE-v06_00-EN.zip?...
My question SRR why not cleared in PSCR? It seems never cleared. Or it cleared by hardware?
I think it should be cleared in USIC0_2_IRQHandler.
/* I2C Read Request Received Callback Function
*
* This function is the interrupt service routine when the
* shield receives a request for data and when a start
* condition is received.
*
*/
void USIC0_2_IRQHandler(void)
{
byteCount = 0;
uint8_t send = 0x00;
XMC_USIC_CH_TXFIFO_Flush(I2C_CH_NUM);
XMC_USIC_CH_SetTransmitBufferStatus(I2C_CH_NUM, XMC_USIC_CH_TBUF_STATUS_SET_IDLE);
XMC_USIC_CH_TXFIFO_Flush(I2C_CH_NUM);
I2C_CH_NUM->PSCR |= USIC_CH_PSCR_CST5_Msk; /* Clear NACK flag */
I2C_CH_NUM->PSCR |= USIC_CH_PSCR_CST2_Msk; /* Clear Start Condition Received flag */
if(((XMC_I2C_CH_GetStatusFlag(I2C_CH_NUM) & XMC_I2C_CH_STATUS_FLAG_SLAVE_READ_REQUESTED)>>7) == 1U) /* slave read request event occured */
{
...
- Tags:
- IFX
0 Replies