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

need ulp support #347

Closed
zzn26 opened this issue Dec 1, 2023 · 5 comments
Closed

need ulp support #347

zzn26 opened this issue Dec 1, 2023 · 5 comments

Comments

@zzn26
Copy link

zzn26 commented Dec 1, 2023

What I want to achieve is to wake up in deep-sleep state by ulp to detect long key presses.But I can't seem to find any support for ulp.

@Vollbrecht
Copy link
Collaborator

which ulp are you talking about? what esp variant are you using. There are different ulp's for different variants. For example the esp32s3 has the classical ulp/fsm that is programmed in assambly but also has a second variant that can be compiled with a normal riscv toolchain. For the first variant you can find some examples in the riscv-ulp directory. If you want to see how you can interact with it from your normal application you can have a look inside the std-demo from ivmarkov here.

@zzn26
Copy link
Author

zzn26 commented Dec 4, 2023

which ulp are you talking about? what esp variant are you using. There are different ulp's for different variants. For example the esp32s3 has the classical ulp/fsm that is programmed in assambly but also has a second variant that can be compiled with a normal riscv toolchain. For the first variant you can find some examples in the riscv-ulp directory. If you want to see how you can interact with it from your normal application you can have a look inside the std-demo from ivmarkov here.

@Vollbrecht I'm sorry if I wasn't clear. I'm using esp32s3.I clone the std-demo of ivmarkov you mentioned, but unfortunately cargo check suggests me

no method named `load` found for struct `esp_idf_svc::hal::ulp::ULP` in the current scope
    --> src/main.rs:1357:13

I'm not sure what's wrong with that

@Vollbrecht
Copy link
Collaborator

you see that he is using a specifc sdkconfig file for the s2 here in the project and he mentiond that this example assume s2. Some of the methods are only availabe if ulp support is enabled via sdkconfigs. You can see the flags that are checked in the source code of ulp. So this needed to be set in the sdkconfigs with the appopriate names simmilar how its done in the demo's sdkconfig

@zzn26
Copy link
Author

zzn26 commented Dec 5, 2023

I seem to have found the problem, my esp-idf version is 5.1.1 and the ulp compile condition requires a major version number of 4.

@zzn26
Copy link
Author

zzn26 commented Dec 5, 2023

you see that he is using a specifc sdkconfig file for the s2 here in the project and he mentiond that this example assume s2. Some of the methods are only availabe if ulp support is enabled via sdkconfigs. You can see the flags that are checked in the source code of ulp. So this needed to be set in the sdkconfigs with the appopriate names simmilar how its done in the demo's sdkconfig

@Vollbrecht I solved this problem by referring to ivmarkov's demo and calling esp-idf-sys directly, thank you very much for your answer.

@zzn26 zzn26 closed this as completed Dec 5, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants