-
Notifications
You must be signed in to change notification settings - Fork 105
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
bsp: New BSP for M5Core2 (BSP-514) #344
Conversation
@tore-espressif PTAL🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for this PR. I made the first round of the review and put some comments.
One additional thing:
- Please, could you add default sdkconfigs (
sdkconfig.bsp.m5stack_core_2
) to relevant examples? - I tried
display_audio_photo
example after some minor changes (disabled microphone) and the speaker is not working - audio file is not playing.
Here is patch of my changes in example. We can push it too.
audio_photo_disable_patch.txt
I will continue with review tomorrow.
I will add the default sdkconfigs of m5core2. When I tested the audio, I tried to modify it based on the display_main.txt example, speaker work fine. I will try to check what went wrong, you can also try my modified display_main.c. Thank you for your help. |
I think the problem may be here, Core2's amplifier is using NS4168. I'm initialising I2C here because the speaker enable pin is controlled by the AXP192/AXP2101 for I2C communication I'm sorry, but this is an amplifier chip from a Chinese manufacturer, and they don't seem to provide the datasheet in English. |
@Tinyu-Zhao I tested the example from you and it is working fine. But the function |
I think Core2 is similar to this board, which does not use I2C controlled power amplifier chip, but the sdkconfig of this board does not seem to appear in "display_audio_photo". |
Mentioned board has ESP32C3 chip, which has limited RAM size and the |
🤔That’s a little weird. |
Yes, today, I tried lot of settings and combinations and it is still not working. I am sorry, I will continue next week. |
@Tinyu-Zhao we usually resolve the review discussions only after the fixed code has been pushed to GitHub. Do you have any local updates that you could push? |
Yes, there are many. I thought that pushing them one by one might disturb you, so I thought about merging them. I will push the modified parts now. Thank you. |
Sounds reasonable to me! thanks |
@Tinyu-Zhao In the mean time, here's a quick fix for audio playback m5stack#3 together with description of the proposed solution |
With the help of @tore-espressif, the Core2 speaker works successfully, thank you. |
@tore-espressif @Tinyu-Zhao I was thinking about it and I would like to add new API function somethink like |
I think it's a good idea to give users more flexibility to control device peripherals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, why there is not implemented microphone? The board has it, right?
The mic and speaker on the Core2 share a pin. You have to disable one to enable another: https://github.com/m5stack/Core2-for-AWS-IoT-Kit/blob/BSP-dev/lib/audio/core2foraws_audio.c |
What is the plan here for the IMU and the external i2c port? @espzav @tore-espressif @Tinyu-Zhao, here's no protection in this BSP to prevent simultaneous access from different threads to different i2c devices on the same bus. I didn't see it in the Core3 example either. |
e55ca0b
to
d820a75
Compare
This is implemented in the I2C driver itself; in esp-idf. If you call I2C master API from different threads (e.g. drivers), they will be executed one after the other. So we don't implement any other protection mechanism in the BSPs. Have you encountered any issues regarding this? |
@Tinyu-Zhao please, could you change feature initialization ( |
I have modified the feature function as follows🙏 |
Thank you. I am sorry, I thought a little different.
I dont't like initialization of battery and vibration in Do you see what I mean? |
OK, I understand, I will continue working tomorrow |
I have made the modifications as required, please check |
@Tinyu-Zhao thanks for all the work! Please resolve all conflicts, so we can go ahead with merge |
@tore-espressif, All conflicts have been resolved, please help to review them. |
LGTM! Let's wait for @espzav , he should be back from vacation next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nitpick comments. Otherwise LGTM
- please rebase master branch
f3c4739
to
761e16b
Compare
@espzav I have completed error correction and rebasing, please review. |
761e16b
to
cc07a7b
Compare
Sorry, I corrected him.
… On Sep 4, 2024, at 13:50, Vilem Zavodny ***@***.***> wrote:
@espzav commented on this pull request.
In SquareLine/boards/v9/m5stack_core_2/main/idf_component.yml <#344 (comment)>:
> @@ -0,0 +1,6 @@
+description: ESP-BSP SquareLine LVGL Example
+targets:
+ - esp32s3
+dependencies:
+ idf: ">=5.0"
+ m5stack_core_s3: ">=1.1.0"
I still see here S3 instead of S2.
—
Reply to this email directly, view it on GitHub <#344 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKSXAYIREHUMCA6E6WVQPFLZU2NT7AVCNFSM6AAAAABKE4VEJSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENZZGA2TIMRRGY>.
You are receiving this because you were mentioned.
|
cc07a7b
to
bff20fe
Compare
ESP-BSP Pull Request checklist
Change description
New BSP for M5Core2