Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
04 Feb 2022 04:19 #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
04 Feb 2022 20:10 #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
05 Feb 2022 01:10 #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
05 Feb 2022 20:57 #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
## 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.

More
05 Feb 2022 22:06 #234057 by scotta
This is really strange and I can only point to something weird going on with eh Makerbase bootloader. Issues with the Robin and now the Monster8.

The SKR2 code should just work as it's the same chip.

Strange that is reboots when it goes to mount the blockDevice.

Yes, doing the changes you suggested should be about it. Flash with the STLink and fingers crossed.

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

More
06 Feb 2022 00:03 #234061 by cakeslob
Ok, I was wondering if there was anything special you were doing that I couldnt see, or experienced it in your travels while working with the robin

Pre bootloader
-Monster8 writes firmware firmware via sd, reads and configs modules but disables the spi after it finishes
-Octopus firmware does nothing, skr2 firmware loads fine via sd

Post bootloader ( as im fairly sure ive written over the bootloader)
-Both Octopus and Monster8 work every other 12v power cycle, and get stuck in a loop when starting up the other 50% of the time

so basically,
cycle 12v power, it works
cycle 12v power, it doesnt work
cycle 12v power it works
I have monster8 hooked up right now, but its the same with octopus
I caught it on a doesnt work cycle, loaded the firmware, hit debug , appears to be stuck at "function spi_master_write," uart is just looping (I dont know how to use debug very well, but this is where it stops when I pause)
## Entering SETUP state
1. Reading json configuration file
Mounting the filesystem...
Remora PRU - Programmable Realtime Unit
reboot button does nothing
cycle 12v power, everything works, load the program with debug and it works
cycle 12v power again, doesnt work, same loop

Im uploading firmware via stlink through mbed, and through DFU using usbc and stm32cube programmer, both have the same outcome.
Mostly just a sanity check for if im not doing something obvious, because the fact that it works every other power cycle is confusing me and it feels so close to working...

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

More
09 Feb 2022 01:37 #234368 by cakeslob
 Heres what I got today, this is what the monster8 is outputting to my dinky ass logic thing





On good boot, SPI3 for sd card doesnt do anything, except whats in the picture.
On bad boot, it keeps flowing
This is what I get from debug on bad boot.
0x080067fa in LL_SPI_IsActiveFlag_RXNE ()
Check if Rx buffer is not empty SR RXNE LL_SPI_IsActiveFlag_RXNE

is what it says about it
Here is what I think I understand
The mosi should be doing nothing be instead its shitting out data, which sets the LL_SPI_IsActiveFlag_RXNE flag active, which causes the sdblockdevice to not initialize... and because its every other power cycle, something is...thats as far as i understand
Attachments:

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

More
10 Feb 2022 16:35 #234491 by tuzki
My first step.
IDE gave me a lot of error reports
Attachments:

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

More
11 Feb 2022 00:32 #234546 by cakeslob

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

More
11 Feb 2022 03:51 #234550 by tuzki
I found that remora provides binaries, and I don't need to compile it

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

Time to create page: 0.364 seconds
Powered by Kunena Forum