Skip to content

Commit

Permalink
extmod/network_wiznet5k: Properly enable interrupt signal on w5100s.
Browse files Browse the repository at this point in the history
According to the datasheet, the IEN bit to enable the interrupt is in the
MR2 register, not the MR register.

This is just cleanup as the interrupt appears to be enabled by default
after resetting the chip.

Tested on W5100S_EVB_PICO.
  • Loading branch information
greezybacon authored and dpgeorge committed Mar 25, 2024
1 parent fcaf109 commit 086d4d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extmod/network_wiznet5k.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static void wiznet5k_init(void) {
setSn_IMR(0, Sn_IR_RECV);
#if _WIZCHIP_ == W5100S
// Enable interrupt pin
setMR(MR2_G_IEN);
setMR2(getMR2() | MR2_G_IEN);
#endif

mp_hal_pin_input(wiznet5k_obj.pin_intn);
Expand Down

0 comments on commit 086d4d1

Please sign in to comment.