Fix for cyw43 driver working with SMs other than 0 #1080

Merged
Lord-Lucan merged 2 commits from cyw43_state_machine_fix into develop 2022-10-27 16:06:33 -05:00
Lord-Lucan commented 2022-10-26 15:40:46 -05:00 (Migrated from github.com)

Fixes #1077

cyw43 driver is currently hard wired to use state machine (SM) 0. If a user program is allocated the same pio and SM 0 as cyw43 then the program will fail. Both cyw43 and user program will fall over each other trying to use SM 0.

This fix updates the cyw43 driver so that it doesn't assume that it has unique access to SM 0.

The cyw43 driver has a nod to playing fairly with the pio and sm but didn't quite make the required changes in cyw43_spi_transfer :)

Fixes #1077 cyw43 driver is currently hard wired to use state machine (SM) 0. If a user program is allocated the same pio and SM 0 as cyw43 then the program will fail. Both cyw43 and user program will fall over each other trying to use SM 0. This fix updates the cyw43 driver so that it doesn't assume that it has unique access to SM 0. The cyw43 driver has a nod to playing fairly with the pio and sm but didn't quite make the required changes in cyw43_spi_transfer :)
kilograham (Migrated from github.com) reviewed 2022-10-26 18:48:39 -05:00
kilograham commented 2022-10-26 18:50:13 -05:00 (Migrated from github.com)

can you please fix conflicts (presumably re-base onto newer develop)

can you please fix conflicts (presumably re-base onto newer `develop`)
lurch (Migrated from github.com) reviewed 2022-10-27 05:30:32 -05:00
lurch (Migrated from github.com) commented 2022-10-27 05:30:31 -05:00

Does (1u << (PIO_FDEBUG_TXSTALL_LSB + bus_data->pio_sm)) get collapsed into a compile-time constant, or does it get recalculated for every iteration round the loop?

Does `(1u << (PIO_FDEBUG_TXSTALL_LSB + bus_data->pio_sm))` get collapsed into a compile-time constant, or does it get recalculated for every iteration round the loop?
Lord-Lucan commented 2022-10-27 14:37:20 -05:00 (Migrated from github.com)

I've just rebased onto develop. Added a const variable for fDebug flag.

I've just rebased onto develop. Added a const variable for fDebug flag.
kilograham (Migrated from github.com) approved these changes 2022-10-27 16:05:54 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!1080
No description provided.