How to reset FX3 sync slave fifo from FPGA or MCU

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

cross mob
Anonymous
Not applicable

In my application I need to reset sync slave fifo periodically from FPGA how its possible please explain

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

I understand that you are referring to resetting the DMA channels used in the slave FIFO interface. To perform this, please follow the below steps.

- Register an FX3 GPIO to sample input from the FPGA along with the configuration that generates an interrupt using the CyU3PGpioSetSimpleConfig() API. FPGA needs to drive this GPIO whenever the FIFO needs to be reset.

- Associate an interrupt callback for the GPIOs using the CyU3PGpioInit() API.

- In the callback function, the GPIO ID is passed as a parameter. This can be used to check if the intended GPIO generated the interrupt.

- In case you are using the SlaveFifoSync firmware that comes with the FX3 SDK or the AN65974, you can call the CyFxSlFifoApplnStop() function to disable the DMA channel and the CyFxSlFifoApplnStart() function to re-enable the DMA channel. These operations are to be performed inside the GPIO interrupt callback function. As an alternate method, an event can be set in the GPIO interrupt callback function and the CyFxSlFifoApplnStop() and CyFxSlFifoApplnStart() functions can be called in the thread for(;;) loop upon receiving this event.

NOTE: If the GPIO is being used by other blocks of FX3, the CyU3PDeviceGpioOverride() API needs to be called prior to CyU3PGpioSetSimpleConfig() API. Please refer to the GpioApp firmware example that comes with the FX3 SDK as a reference.

Please let us know if you need more information or clarity.

Best regards,

Srinath S

View solution in original post

0 Likes
1 Reply
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

I understand that you are referring to resetting the DMA channels used in the slave FIFO interface. To perform this, please follow the below steps.

- Register an FX3 GPIO to sample input from the FPGA along with the configuration that generates an interrupt using the CyU3PGpioSetSimpleConfig() API. FPGA needs to drive this GPIO whenever the FIFO needs to be reset.

- Associate an interrupt callback for the GPIOs using the CyU3PGpioInit() API.

- In the callback function, the GPIO ID is passed as a parameter. This can be used to check if the intended GPIO generated the interrupt.

- In case you are using the SlaveFifoSync firmware that comes with the FX3 SDK or the AN65974, you can call the CyFxSlFifoApplnStop() function to disable the DMA channel and the CyFxSlFifoApplnStart() function to re-enable the DMA channel. These operations are to be performed inside the GPIO interrupt callback function. As an alternate method, an event can be set in the GPIO interrupt callback function and the CyFxSlFifoApplnStop() and CyFxSlFifoApplnStart() functions can be called in the thread for(;;) loop upon receiving this event.

NOTE: If the GPIO is being used by other blocks of FX3, the CyU3PDeviceGpioOverride() API needs to be called prior to CyU3PGpioSetSimpleConfig() API. Please refer to the GpioApp firmware example that comes with the FX3 SDK as a reference.

Please let us know if you need more information or clarity.

Best regards,

Srinath S

0 Likes