- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When PSOC63 is master and 'useRxFifo' enabled we losing data within 28bytes if interrupts are disabled for more than 400msec or so.
Expected Data: 40011900031E030008000102038081828302D002FF020004881001AE
Received Data: 4001198302D002FF020004881001AEFFFFFFFFFFFFFFFFFFFFFFFFFF
When 'useRxFifo' is enabled the MCU suppose to receive up to 127 bytes on its own without intervention firmware right? Why are we seeing this effect for less than 32bytes?
We are planning to disable the useRxFifo, but want to understand just to make sure.
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Tags:
- i2c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RaMu_4639021,
From the expected and actual data that you attached, it is observed that the bytes are being missed in the middle of the entire data frame. After initializing the I2C Master (I2C initialization code), set the RX FIFO level as maximum i.e. 128 using the following API Cy_SCB_SetRxFifoLevel().
Please check the above instruction once and update the thread.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please attach the I2C Master project that you are using? You can attach the demo version of the project which reproduces the issue.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ganesh,
Unfortunately, We don't use PSoC Creator, so I don't have a project to share with you. Just adding the following in our idle task causes the problem.
uint32_t interruptState = Cy_SysLib_EnterCriticalSection();
cpu_delay_us(400);
Cy_SysLib_ExitCriticalSection(interruptState);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
1. Can you please let us know whether you are using Low-level APIs or High-level APIs for I2C Master?
2. Generally, we recommend you to use CPU Sleep in idle mode. Can you please tell us why are you using EnterCriticalSection and ExitCritical section?
Thanks and regards
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ganesh,
Thanks for the response.
We use High-level APIs for I2C Master.
We go sleep in idle mode, we set up a lptimer before going to sleep to keep track of the amount of time it spent in sleep for OStick correction, that lptimer code was in the critical section to cause the problem, Now we manage to move that code out of the critical section, but still worried for other critical sections.
With useRxFifo disabled everything works great, but like to enable it to reduce firmware intervention in I2C comm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Ganesh,
Our system uses the cooperative multitasking scheme with a little over a dozen tasks, Don't want to use blocking low-level apis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RaMu_4639021,
From the expected and actual data that you attached, it is observed that the bytes are being missed in the middle of the entire data frame. After initializing the I2C Master (I2C initialization code), set the RX FIFO level as maximum i.e. 128 using the following API Cy_SCB_SetRxFifoLevel().
Please check the above instruction once and update the thread.
Thanks
Ganesh