EXECCTRL_JMP_PIN referenced but not explained #242
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#242
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
"EXECCTRL_JMP_PIN" is refernced 3 times in the SDK without an explanation of how/where to set it.
[ https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-c-sdk.pdf page 59 ]
I did eventually find: static void sm_config_set_jmp_pin (pio_sm_config *c, uint pin) but it is a different call and the two are not linked.
[https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-c-sdk.pdf page 148, 152 ]
maybe explain "EXECCTRL_JMP_PIN" better, or change the reference to "sm_config_set_jmp_pin"
[Edit: corrected the page numbers to the ones on the page, not the literal PDF page]
EXECCTRL_JMP_PINis theJMP_PINfield of theSM0_EXECCTRL,SM1_EXECCTRL,SM2_EXECCTRL&SM3_EXECCTRLRegisters described on page 395 of the RP2040 Datasheet .Unfortunately the fields / registers aren't always referenced in exactly the same manner throughout our documentation, but it sounds like in this particular case if you searched for "jmp_pin" you would have found what you were looking for?
I did search for jmp_pin which is how I found the example I quoted above - as a complete beginner in programming and my first attempts at using the pico, I found the reference for this in the SDK very confusing, until I found (and guessed) that it could be set with the sm_config_set_jmp_pin() function.
The description on page 395 of the RP2040 datasheet is even more confusing for me - I would have preferred if the mention of it in page 59 of the SDK had shown how to set or use it, or even referenced the function on 148/152.
No need to go to the RP2040 datasheet, as it is already in the SDK (which is the document that referenced it)
As "a complete beginner in programming", PIO probably isn't your best starting point!! It's a fairly advanced topic.
And if you don't reference the RP2040 datasheet at the same time as the SDK documentation, I suspect you may find the SDK documentation even harder to understand.
Complete beginners are much better served by MicroPython https://www.raspberrypi.org/documentation/rp2040/getting-started/#getting-started-with-micropython which also lets you use PIO if you want. (Although unfortunately the MicroPython documentation still has gaps https://github.com/micropython/micropython/issues/6855 )
I was merely trying to provide some feedback.
I have managed to figure it out (as stated above) but it too me a few hours as the SDK mention of it was rather obscure in my opinion.
maybe "complete beginner" is the wrong phrase, I do know my way around C a bit, which is why I prefer to use C over Python - which while I know is a popular language, I tend to prefer to avoid where possible.
I do realise I am taking the harder path here, but I do prefer to stick to languages with which I am more familiar - the PIO assembly is giving me a hard time, but at least I can follow it and (to a degree) bend it to my purposes, though some others might not be as tenacious as myself - My belief was that the SDK was there to provide a reference, but to only mention setting the jump pin once, and not tie it to the part of the SDK that shows how seems to be a limitation.
I am only trying to provide some feedback that might help provide clarity for others - since I have (eventually) found my own solution - which I had mentioned in the very first post.
I guess next time, Ill just keep my mouth shut - apologies if I have caused any offense by my suggestions - I was simply trying to help.
Thank you for your comments lurch, but I dont feel they were helpful or particuarly relevant to the issue I thought I was highlighting,
Hello @dghoti
I'm sorry if my reply came across a bit blunt last night, perhaps I was too tired and being overly-defensive 🙁 I'm afraid your "complete beginner in programming" threw me a bit!
We do welcome feedback and suggestions, thank you for pointing out which parts of our documentation you found confusing / lacking 👍
Hi @lurch,
Its all good - maybe I understate my programming abilities as I still consider myself an amatuer (compared to a lot of what I see here). Mistakes were made on my side too - you're a good egg!