WIZnet Developer Forum

Critical section implementation

Hello,
I would lie your advice for the wizchip_cris_enter() and wizchip_cris_exit() implementation.
What should I enable/disable upon entering these funcs?

Thanks

These functions are for enable/disable interrupt.
So, place disable interrupt function to wizchip_cris_enter and place enable interrupt function to wizchip_cris_exit.

Hi, thanks a lot for quick reply.
Can you please help me understanding what interrupts should I disable?

Are we talking about SPI TX interrupts?
(I guess SPI Rx interrupts should NOT be disabled, as the host waits for receiving answers from Wiznet.)

Please elaborate, if you can.

Thanks

Not about SPI.
Interrupt in MCU. If MCU receives interrupt signal, MCU stop current command and then jump to interrupt routine.
So, there are wizchip_cris_enter() and wizchip_cris_exit().

OK, thanks.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.