Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
4 years 9 months ago #233308 by scotta
Hi, I did not realise that they have had to bring out another version of the SKR2. Good to know.

Something really strange with the 446 boards.. I'll need to get one at some point to have a play myself.

My next approach would be to try a blinky program in STM32CubeIDE so as to eliminate bootloader issues. Just remember to take a copy of the whole flash to keep the bootloader code safe ;-).

Please Log in or Create an account to join the conversation.

More
4 years 9 months ago - 4 years 9 months ago #233681 by cakeslob
I figured out my debugger issue, it now looks like im in the matrix. But I dont know what it means.....
I step through the program, no errors show up, but it just loops back to mbed_sdk_boot when it tries to set up independent watchdogs. Im not sure if this is how you are supposed to do this but here is the last thing before it goes back to mbed_sdk_boot. your patience is appreciated
Code:
/* Enable IWDG. LSI is turned on automaticaly */ __HAL_IWDG_START(hiwdg);

edit, ok that is from debugging, i dont know what im doing yet
Last edit: 4 years 9 months ago by cakeslob.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233941 by cakeslob
I have the octopus 446 and monster8 both working.....50% of the time

When I load the firmware from mbed using run/debug I can get them to run correctly, but only every other boot. /doesnt work/works/doesnt work/ works/ kinda like that

Does that mean its a bootloader thing that was causing the issue?

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233995 by scotta
Hi, great to hear that you are making some progress. I've not tried to debug with Mbed Studio, and how to debug with a bootloader in the mix... ? When I was getting Remora to run on a Robin STM32F103 board, I could only get it to run properly without the bootloader. With the bootloader, a simply Blinky program would start and then run super slow, like the clock config got changed part way through. Really strange.

Maybe there is a similar issue here?

The work I've been doing with Remora-ethernet for the NVEM CNC board is meaning more of Remora is porting over to bare STM32 HAL without the need for Mbed API's. The debugging in STM32CubeIDE has proven to be really useful. I'll need to investigate how to debug with a bootloader.

Mbed Studio still has a simpler and more flexible build system when wanting to have numerous targets though.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #234008 by cakeslob
The part that was throwing me off was that the skr2 loaded with the bootloader and octopus build was a no start period. Debugging was just an interrupt loop caused by debugging (i think) until i accidentally loaded over the bootloader with a blinky and it finally worked , then the program was able to debug, but then it was just some minor config changes. The monster8 half worked but it was turning off spi bus so it would never connect, without the bootloader that stopped happening, and now it works fine.

So, my only issue now, is probably related to bootloader related config things. is it just change the system clock to #define VECT_TAB_OFFSET 0x00000000U and and remove "target.mbed_app_start" from mbed_app?

Mbed is simpler for sure which is good for me. the multi targets will come in handy when they run out of st chips

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #234053 by cakeslob
What looks like is happening/what I observe is happening
-Program loads from mbed and runs fine
-unplug stlink and power cycle the board
-in uart, it loops this over and over, one of them was looping further into the program, after it created all modules
Code:
## Entering SETUP state 1. Reading json configuration file Mounting the filesystem... Remora PRU - Programmable Realtime Unit
- I power cycle the board, then everything works as expected
- I power cycle the board again, and it loops setup again

I theorize it has something to do with it trying to load the program and stopping at the bootloader offset or something like that, because it happens on both boards
then on power cycle it loads the full program, and everything is fine.
Copying the robin,
in system_clock, ive changed to this " #define VECT_TAB_OFFSET 0x00000000 "
in mbed_app, ive removed " target.mbed_app_start "
in custom_targets , ive removed " bootloader_supported "

Is there something else I have missed?

Please Log in or Create an account to join the conversation.

Time to create page: 0.524 seconds
Powered by Kunena Forum