Skip to content

Help on making a new *_map.h file #742

Answered by terjeio
HubertBloom asked this question in Q&A
Discussion options

You must be logged in to vote

Does this mean that it is not possible to select any pin for any function?

No.

One pin is set to another pin plus an offset. Why is it like this?

Mainly to not exhaust PIO state machines. A single state machine can handle one or many pins - but only if they are consecutive.

Is it not possible to just pick a pin and put a literal number in the #define? And change the number according to the board layout?

It is possible, as long as you do not exhaust PIO state machines for controlling the stepper pins. The RP2040 has eight, one is used for the main stepper timer. Depending on the configuration others might be used for no-stepper related stuff.

See the RP2040 datasheet, Chapter 3 (3.5.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HubertBloom
Comment options

@terjeio
Comment options

Answer selected by HubertBloom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants