Skip to content
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

spressense HAL [CXD5602] #3770

Open
nakajimayoshi opened this issue Jan 14, 2025 · 1 comment
Open

spressense HAL [CXD5602] #3770

nakajimayoshi opened this issue Jan 14, 2025 · 1 comment

Comments

@nakajimayoshi
Copy link

nakajimayoshi commented Jan 14, 2025

Hi all, thanks for making this crate.

Sony released the spressense board based in December last year and it looks to be a strong competitor to current offerings from espressif and raspberry pi.

Thanks to Sony being a rather large player, there's a ton of documentation as well on the chip.

https://developer.sony.com/spresense/development-guides/home_en.html

It currently supports development via:

  • Arduino
  • Sony's proprietary SDK
  • Circuit python

I think it would be a cool project to add embassy to this list :)

I might look into implementing the HAL myself, but my experience programming microcontrollers is very slim so I wanted to at least start a discussion on it. There's an existing SDK in C, so it probably just involves writing rust bindings to the C api.

The board uses a CXD5602 chip. I'm not sure if a current HAL in the repo supports this.

@i509VCB
Copy link

i509VCB commented Jan 31, 2025

I don't have any Spresense boards, but from the process of me working on a TI MSPM0 HAL for embassy I can try to give some advice.

It currently supports development via:

  • Arduino
  • Sony's proprietary SDK
  • Circuit python

From a bit of looking, Sony seems to provide 3-Clause BSD licensed SVD files. I would suggest starting with the SVD files and then using something like chiptool or svdtools which can generate code from this. This would let you write most of the code for driving the chip from Rust. A number of the peripherals are also the standard ARM IP, so those are documented by both Sony and by ARM.

I would also search for or ask for a "Technical Reference Manual" or similar document (could be part of the datasheet). While the SVDs can be helpful, anything Sony specifically designed IP for will be a challange to use. The technical reference manual would have per register documentation.

From that probably follow the guide in probe-rs to write a flash algorithm for the chip. The SVDs seem to define what memory range is for flash, but a technical reference manual would help there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants