Skip to content

Conversation

@fanfare-ff
Copy link
Collaborator

@fanfare-ff fanfare-ff commented Jan 13, 2026

  • Please check if the Pull Request fulfils these requirements

    • PR title follows the style: type: Descriptive Name
    • Commit messages follow the guidelines
    • Code compiles
    • New additions are tested
    • Changes are documented on the website (refer to the docs section)
  • Link related open issue
    [TASK] MPU configuration for ADC driver #74

  • Provide a short description
    Implement MPU config for ADC driver

  • Provide a more detailed list of changes

    • Disable cache with proper MPU config
    • Refactor copy-paste logic into indexable maps
    • Generalize some DMA functionality for ADC and DAC
    • Remove every cache invalidation
    • Rewrite DMA errors
    • Refactor all function and var names
    • Update projects to new ADC buffers
  • Does this PR introduce a breaking change?
    N/A

  • Other information
    SensEdu_ADC_Buffer and SensEdu_DAC_Buffer both are using MPU config now, so it doesn't matter which one to use.
    There is a new macro SensEdu_DMA_Buffer which is preferable to use to reflect the identical buffer logic.

Disable cache with proper MPU config
Refactor copy-paste logic into indexable maps
Generalize some DMA functionality for ADC and DAC
Remove every cache invalidation
Rewrite DMA errors
Refactor all function and var names
@fanfare-ff fanfare-ff linked an issue Jan 13, 2026 that may be closed by this pull request
@fanfare-ff fanfare-ff self-assigned this Jan 13, 2026
Copy link
Collaborator

@svire-at svire-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

#define ACTUAL_SAMPLING_RATE 250000 // You need to measure this value using a wave generator with a fixed e.g. 1kHz Sine
#define STORE_BUF_SIZE 32 * 32 // 2400 for 1 measurement per second.
// only multiples of 32!!!!!! (64 chunk size of bytes, so 32 for 16bit)
#define STORE_BUF_SIZE 32 * 32 // 2400 for 1 measurement per second
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong number in the comment

#define ACTUAL_SAMPLING_RATE 250000 // You need to measure this value using a wave generator with a fixed e.g. 1kHz Sine
#define STORE_BUF_SIZE 32 * 32 // 2400 for 1 measurement per second.
// only multiples of 32!!!!!! (64 chunk size of bytes, so 32 for 16bit)
#define STORE_BUF_SIZE 32 * 32 // 2400 for 1 measurement per second
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong number in the comment

Copy link
Collaborator

@LorenzoBuldorini LorenzoBuldorini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything`s look fine, just number calculation for buffer size as Azra pointed out in "projects/UltraSound/extra/ultrasonic_distance_acq_detailed_dataset/ultrasonic_distance_acq_detailed_dataset.ino" and "projects/UltraSound/ultrasonic_distance_acq/ultrasonic_distance_acq.ino"

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.

[TASK] MPU configuration for ADC driver

4 participants