Skip to content

Update Ads7138 (alert pin example, thread safety)#68

Merged
finger563 merged 3 commits intomainfrom
example/ads7138-alert
Jun 7, 2023
Merged

Update Ads7138 (alert pin example, thread safety)#68
finger563 merged 3 commits intomainfrom
example/ads7138-alert

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Jun 7, 2023

Description

  • Changed the event / alert checking to actually use GPIO ISR + task, with the ALERT pin connected to A0 of the QtPy
  • Updated ads7138 to have mutex protecting access to ensure thread safety
  • Updated sdkconfig to have 1 khz RTOS and 240 MHz processor clock
  • Updated example to configure the alert pin explicitly
  • Updated docs (readme)
  • Rebuild docs (html)

Motivation and Context

It's always good to have examples more representative of real code - so we moved the event flag checking to actually happen when the alert pin triggers (and updated the docs / test bench to connect the ALERT pin to the QtPy).

How has this been tested?

Building and running the updated example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2023-06-07 at 11 54 43
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Changed the event / alert checking to actually use GPIO ISR + task, with the ALERT pin connected to A0 of the QtPy
* Updated docs (readme)
* Rebuild docs (html)
@finger563 finger563 added enhancement New feature or request adc examples labels Jun 7, 2023
@finger563 finger563 self-assigned this Jun 7, 2023
* Updated ads7138 to have mutex protecting access to ensure thread safety
* Updated sdkconfig to have 1 khz RTOS and 240 MHz processor clock
* Updated example to configure the alert pin explicitly
@finger563 finger563 changed the title example(ads7138): update Update Ads7138 (alert pin example, thread safety) Jun 7, 2023
@finger563 finger563 marked this pull request as draft June 7, 2023 17:58
@finger563 finger563 marked this pull request as ready for review June 7, 2023 17:58
@finger563 finger563 marked this pull request as draft June 7, 2023 18:02
@finger563 finger563 marked this pull request as ready for review June 7, 2023 18:03
@finger563 finger563 marked this pull request as draft June 7, 2023 18:06
@finger563 finger563 marked this pull request as ready for review June 7, 2023 18:07
@finger563 finger563 merged commit f80f4d4 into main Jun 7, 2023
@finger563 finger563 deleted the example/ads7138-alert branch June 7, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adc enhancement New feature or request examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant