-
Notifications
You must be signed in to change notification settings - Fork 31
Description
I am currently working on integrating the network functionality into an existing MicroPython module, specifically for WIZNET5K.
I've successfully implemented most features by porating SPI and the micropython-microbit-v2\lib\micropython\extmod\network_wiznet5k.c file.
However, I encounter a problem where the process freezes at the point in the code where MICROPY_BEGIN_ATOMIC_SECTION(); is called.
Here's the relevant code snippet (micropython-microbit-v2\lib\micropython\extmod\network_wiznet5k.c/ Line 130):
STATIC void wiz_cris_enter(void) {
wiznet5k_obj.cris_state = MICROPY_BEGIN_ATOMIC_SECTION();
}If I omit this section, the process runs, but the mutex functionality, which is crucial for this program, is lost.
This feature operates flawlessly on other MCUs, such as the rp2040 and stm32. What might be causing the difference with the microbit? Or is there another aspect of the modification that I might have overlooked?