-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BTT-Octopus with STM32H723? #68
Comments
Fantastic, always looking for help, lets start with the H7
spi issue is the biggest problem, and I am finding it very hard to debug the H7 |
RE TMC5160 |
Fine.. thank you for this fast response... BR |
Hi, Btw. is there a double of ROBIN_E3 in the custom_targets.json? it looks like a typo... BR Thilo |
hmm cant find my writeup, its in the issues page somewhere but ill do a quick one
|
The Robin e3 and the robin 3 are 2 different boards |
Thank you - it works. sorry not custom_targets - it was mbed_app.json
|
Hello, after playing around with mbed studio i am really confused about selecting custom targets. None of the custom boards appears. After correct the mbed_app.json by deleting first robin_e3 entry i have a success now. After reopen mbed studio all custom tragets appeared.. BR |
good eye, although it doesnt seem to cause me any issues with custom targets, with or without both entries. something incorrect in custom_targets.json would describe what you are experiencing |
I've dug out my old work on the SKR3 and have it working upto SPI comms. DMA appears to be working but I'm getting the request header coming back for some reason. Currently in SMT32cubIDE but the thought is to move this into PlatformIO as Cakeslob suggested. I'd appreciate any feedback on the SPI issues... |
Hi Scott, just a first hint: BR |
Hi Thilo,
main.c is excluded from compilation. Just used for MX code generation. SPI
is initiated in the RemoraComms.cpp
https://github.com/scottalford75/Remora-STM32H7xx/blob/57e10da7452c3fa29c68dc38867c0cfa82b1b27f/Core/Src/modules/remoraComms/RemoraComms.cpp#L64
Getting a hardfault now for some reason as well...
…On Tue, Nov 19, 2024 at 8:10 AM thaala ***@***.***> wrote:
Hi Scott,
just a first hint:
hspi1.Init.DataSize = SPI_DATASIZE_4BIT;
i guess it should be 8 bits..
BR
Thilo
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBMVIOVGE64NRZU44JEDAT2BJJVJAVCNFSM6AAAAABRDD5QNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBUGEZTOMJUGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi Scott, actually i have some success with my Octopus-H723 SPI. I have tried some time to put it into same reciepe as F4 - Boards but it seems H7 have integrated dma and my tries to port are unsuccessful.. additional the windows msdev testprog for sending SPI - data over stlink bridge BR |
Hi, regarding the debugger fault i found a mem align fault while hal procedure HAL_SPI_TransmitReceive_DMA() checks not initialzied handle of RXDMA. i solved this in that way..
i second thing are this updated lines in start procedure:
....related to that link from ST: and a last thing please: thank you in advance! BR P.S. should we use scotts alternative github Remora-STM32H7xx for further discussions? |
Hi Thilo, I'm going to follow you lead and start a project from scratch in STM32CubeIDE rather than hacking around my 2 year old project. I found some posts on line saying there was some .ioc errors in older STM32H7xx projects. Remora component is now available for the RPI5 as well. The data packet is 64 bytes. BR |
Hello cakeslob, because having sd-card and spi now running with the cubeIDE on my octopus H723 here i want to try to port this to mbed.
thank you in advance BR P.S. |
Hi thaala,
Would you mind share your STM32CubeIDE code? I'm still not having any SPI
DMA luck with the H743.
Thanks
Scott
…On Fri, Nov 22, 2024 at 9:33 PM thaala ***@***.***> wrote:
Hello cakeslob,
because having sd-card and spi now running with the cubeIDE on my octopus
H723 here i want to try to port this to mbed.
I am facing two problems.
1.
mbed filesystem couldn't handle extfat like cubeIDE does. I fail to
create an card which could be read by mbed filesystem. Is there a special
(old) formatter? I am unable to create a sdcard havin 512 Bytes blocksize
as mbed fs it want.
2.
debug environment for mbed. Whats your way to debug that custom
board(s) with mbed (i have an stlinkv3 here....)! I found old posts for
setup VSCode but this seems very complicated to me. it seems mbed was a
dead horse before official eol announced.. if you`re use VSCode you may
help me with some json-config files for VSCode debug setup?
thank you in advance
BR
Thilo
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBMVILWVXXWBCTI5BC6RB32B4B6JAVCNFSM6AAAAABRDD5QNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJTGQZTMNRWGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok, some success. Started from scratch and built up each step to find where I made the errors. H743 SPI with DMA is running in circular mode and LinuxCNC comes out of estop. Latest has been pushed to the repo https://github.com/scottalford75/Remora-STM32H7xx Next step is to get the process packet interrupt to work. The method used for the F4 killed the SPI totally. |
Ohh - i am too late.. however. Nice to hear. The GPIO4 interrupt pin needs to be initialized before all other stuff. About the alignments: rxData_t spiRxBuffer; it should be aligned too... pls. give ma a hint about mbed debugging - whats your mbed debbuging way? |
I've never been able to debug properly with Mbed, only by using print
statements. This has especially been the case when working with the
bootloaders.
Cakeslob and I have been talking about the future direction of the code
base with Mbed being announced as end of life in 2026. The thought was to
migrate to PlatformIO. That's my plan with the H743 code, to use that as
the first attempt at setting up a MCU series repo.
It's been years since I've used PlatformIO so I've got to get back into
that as well.
Hoping to getting the threads running on the H743 today.
…On Sun, Nov 24, 2024 at 2:52 AM thaala ***@***.***> wrote:
Ohh - i am too late..
however. Nice to hear.
After visiting your code i could identify the main problem inside my code.
The GPIO4 interrupt pin needs to be initialized before all other stuff.
My code runs also after changing only that..
pls. give ma a hint about mbed debugging - whats your mbed debbuging way?
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBMVIKDKU7PUTZ6P5VFPHD2CCQDHAVCNFSM6AAAAABRDD5QNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVGUZDANJVG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Threads are running but getting strange communication errors. LinuxCNC is happy, just the SKR3 side... Maybe cache cleaning not working correct. The rxData_t is 32 byte aligned in the remora.h so all instances should be aligned to 32 byte boundaries. |
Hey thilo, i dont think you can debug the stm32H7 with debug inside mbed. you need to use something like you said with vscode, or something with visualGDB(?). the pyOCD used in mbed doesnt work with H7. if you can figure out how to replace the pyocd in mbed with a working one, it might work. For the SDcard... i dont use anything special, just default windows stuff or whatever is on the RPi |
Thank you both for your efforts. @cakeslob I try to mount SD-Card/FATFilesystem stuff in mbed env. and getting return error code tells sector size beyond 512 Bytes are not supported - which is nowadays unusual. Searching internet tells also that exFAT is supported in FATFilesystem but not in mbed. However you say that FAT16 formatted cards (using blocksize of min 2048 bytes ) are working (on i. e. octopus 446) - I have to dig deeper in my adpoted configuration. Maybe it will be better using SKR3 - Software which scott are actually preparing. Regarding Platfom IO: - This is frustrating me - Riding along the dead horse mbed ? Trying using Platform IO - but with custom BTT board ? My learning curve tear down dramatical if i have no examples to adopt like the configuration files in mbed. After deep digging into scotts code i understand what remora trys to do - i have also good knowledge about electronics - but my understanding of the mighty HAL is in a beginner state. However - from the look of STM32 processors it seems the best using CubeIDE because lot of well functioning code can be generated and then adopted. @scottalford75 - i want to help with H7 boards if in can - but i need little advice to setup a test scenario with my RPI 5 here. My stlinkv3 SPI-Bridge doesn't support combined Read/Write SPI operations. RPI 5 image is running with the "ready to start LinuxCNC" provided by cakeslob in Forum. Do you think the problem you have is SW or HW related? BR |
Ive never done anything special, checking one of my sd cards, its running FAT(default) under windows, and formatted under FAT(default) the library for the STM32 in platformIO is from cubeIDE, you can also import generated code. since most boards are pretty much the same, theres really only a few things that need be changed to support most boards. If the initial infrastructure is laid out before hand (like drew did with the w5500 remora PIO branch), even someone like me can add boards with relative ease, either using MX or just copying other firmware. Hmm not sure how old that forum post would be, but heres a new quickstart guide just for you
|
Hello cakeslob, i have followed your advice and as last step i have copied the Configsample octopus_xyz. loadrt remora-spi chip_type=STM=SPI_clk_div=32 i got this crash: Debug file information: after removing chip_type parameter LinuxCNC starts but i got two error message popups:
but i have no luck receivin SPI-Master data.... any farther advice? BR |
Hi Thilo, This post has the command line options for the RPi 5. Those messages are "normal" and show that the component has correctly configured itself for the RPi 5 and using the RP1 driver. If you are using the standard SPI0 setup with default frequency then you just need loadrt remora-spi |
I should also mention that SPI mater transmission only occurs when bringing LinuxCNC out of estop. |
OK Whats about raspi gpio 25 state - How to handle it on octopus side? BR |
I'd launch LinuxCNC from the command line and look for error messages in the terminal. Bad SPI comms will be reported. Are you using your H723 firmware? SKR3 code is progressing well. SD card is working along with the threads. The SD card driver needed the cache management enabled. I pushed my latest work to the H743 repo. Currently working on getting the comms reliable. I've done a local fork to add the double buffers for DMA reception. It looks to have solved the corrupt headers I was seeing. Just need to get the buffer swapping logic sorted and robust. To use the reset pin the Reset module is used. |
Hi Scott, i haven't used mbed code - because of the SD card problem - i have stopped my work on it because if SKR3 is ready to use - my task will be much easier. A porting and testing to octopus 723 will be more uncomplicated if SKR3 is ready to use. You have "bad spi comms" reported is this maybe related to this conf in sample file? (i found this in the sample hal-file - octopus_xyz.hal) /# estop loopback, SPI comms enable and feedback But your tip about cache maybe do the trick for SDIO.... BR |
The Remora firmware / slave needs to reply with a packet with a valid
header. If LinuxCNC sees a valid response it will come out of estop and
continue communications. The hal configuration is a latch that will drop
out the estop when comms is lost.
Hope to do more testing on the SKR3 firmware this coming weekend, all going
well.
…On Tue, Nov 26, 2024 at 9:44 AM thaala ***@***.***> wrote:
Hi Scott,
i haven't used mbed code - because of the SD card problem - i have stopped
my work on it because if SKR3 is ready to use - my task will be much
easier. A porting and testing to octopus 723 will be more uncomplicated if
SKR3 is ready to use.
I thouht i try to fiddle out a SPI lifesign from Rasberry together with
the CubeIDE test program but no success about estop.
You have "bad spi comms" reported is this maybe related to this conf in
sample file?
(i found this in the sample hal-file - octopus_xyz.hal)
estop loopback, SPI comms enable and feedback
net user-enable-out <= iocontrol.0.user-enable-out => remora.SPI-enable
net user-request-enable <= iocontrol.0.user-request-enable => remora.SPI-reset
net remora-status <= remora.SPI-status => iocontrol.0.emc-enable-in
... but i couldn't identify some code in mbed software...
But your tip about cache maybe do the trick for SDIO....
I'll give it a try
BR
Thilo
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBMVIJRVBVXBJ55LXBO3A32COR5PAVCNFSM6AAAAABRDD5QNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZGE4DOMRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello all,
i have two boards here from BTT. Octopus V1.1 with H723 processor and a Kraken V1.0 with same processor.
Because Kraken has fixed TMC5160 drivers missing - it may be a problem to use it with remora. Octopus lacks currently support for H723 processor only. Pins of Octopus are same as for M466 processor variant. Could you please give a roadmap to bring remora to the H723 - Version?
Is it maybe only the timing (clocking) setup? In case of success i will contribute the source to your project.
Is there a progress by adding TMC5160 driver code?
Thank you in advance.
The text was updated successfully, but these errors were encountered: