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

Fixes to the new PWM (#1433) #1

Merged
merged 1 commit into from
Sep 11, 2018
Merged

Conversation

mikee47
Copy link
Owner

@mikee47 mikee47 commented Sep 11, 2018

Class HardwarePWM actually provides a function to query the maximum
value of duty.

  • Fix comment

ENABLE_CUSTOM_PWM defaults to 1 since d870c27.

* Fix duty and period conversion in pwm.c
Conversions in pwm.c are bugous. Fix is already available for the
original repository, but the merge request has not yet been accepted.
See StefanBruens/ESP8266_new_pwm#26
for details.

* Create macro to calculate max duty

* Remove hard-coded maximum duty

Class HardwarePWM actually provides a function to query the maximum
value of duty.

* Fix comment

ENABLE_CUSTOM_PWM defaults to 1 since d870c27.
@mikee47 mikee47 merged commit e084a13 into mikee47:develop Sep 11, 2018
mikee47 added a commit that referenced this pull request Apr 30, 2021
Verified that debug statements #1, #3 and #4 are triggered by the test.
Use smaller read buffers for testing to stress code more
mikee47 added a commit that referenced this pull request May 1, 2021
Verified that debug statements #1, #3 and #4 are triggered by the test.
Use smaller read buffers for testing to stress code more
mikee47 added a commit that referenced this pull request May 1, 2021
* Use per-arch hardware configs, and reduce ESP32 app. partition size

* Fix bug in ReadWriteStream::copyFrom()

* Fix TemplateStream

Tested against large (1MB) JSON listing generated from templates, issues arising.

Need to check for remaining plain data before continuing with next tag search
Move check for missing end tag after `evaluate`

* Add test for fragmented read of variable values

Verified that debug statements #1, #3 and #4 are triggered by the test.
Use smaller read buffers for testing to stress code more
mikee47 added a commit that referenced this pull request Oct 19, 2021
* Use per-arch hardware configs, and reduce ESP32 app. partition size

* Fix bug in ReadWriteStream::copyFrom()

* Fix TemplateStream

Tested against large (1MB) JSON listing generated from templates, issues arising.

Need to check for remaining plain data before continuing with next tag search
Move check for missing end tag after `evaluate`

* Add test for fragmented read of variable values

Verified that debug statements #1, #3 and #4 are triggered by the test.
Use smaller read buffers for testing to stress code more
mikee47 added a commit that referenced this pull request Apr 24, 2023
This PR re-implements the task queue using SDK-provided queue API. This allows code running on Core #1 to queue tasks for execution by Sming (which runs on Core #0).

Some care is required running both cores together so some notes have been added to the documentation.

Note: I had a need to run some simple background analogue processing for which core 1 was an ideal solution.
I put all the code in RAM, both for performance reasons and because XIP is suspended during flash erase/write operations (such as file writes). I avoided using floating-point code for the same reasons - FP routines are large so compile to flash.

The Cortex M0+ has hardware support for integer division but these routines compile to flash by default. They're small so have set the SDK PICO_DIVIDER_IN_RAM flag. It seems reasonable that integer arithmetic shouldn't require flash accesses.

Note: There is also PICO_INT64_OPS_IN_RAM and PICO_MEM_IN_RAM which probably warrant further investigation/consideration.
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

Successfully merging this pull request may close these issues.

2 participants