Skip to content

Change FreeRTOS tick rate to 1mS - #456

Merged
ChrisDick merged 1 commit into
emfcamp:mainfrom
Robotmad:1000Hz-FreeRTOS-Rate
Sep 14, 2026
Merged

ChrisDick merged 1 commit into
emfcamp:mainfrom
Robotmad:1000Hz-FreeRTOS-Rate

Conversation

@Robotmad

Copy link
Copy Markdown
Contributor

Force ESP-IDF to use 1mS (i.e. 1000Hz) for FreeRTOS tick period. As long as calls to vTaskDelay() use the macro pd_MS_TO_TICKS (or equivalent) then the delay will be the same, subject to finer resolution being possible. There are times where delays are implicit due waiting for to FreeRTOS task switching - code that depends on these currently delivering 10mS latency could be affected by the faster rate, but should be OK as even 1mS is quite long in electronics terms.

@ChrisDick
ChrisDick merged commit ee80b27 into emfcamp:main Sep 14, 2026
5 checks passed
Robotmad added a commit to TeamRobotmad/badge-2024-software that referenced this pull request Sep 15, 2026
commit 398a2ce
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:25:59 2026 +0100

    use TILDAGON_XXX_I2C_PORT definitions in place of magic numbers for I2C mux ports

commit 83e1411
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:25:32 2026 +0100

    GPIO pins via AW9523B: cache output state, direction and mode in RAM. Use tildagon-i2c-manager one-shot C callback job for the last write of any action so that micropython can return and leave that to take place in parallel.  FreeRTOS Semaphore used to mange serialisation of I2C access for maximum performance.  Move toggle to C layer to take advantage of caching. Update fakes for Pin and ePin.

commit ffc479b
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:23:27 2026 +0100

    Frontboard 2026 compass - use tildagon-i2c-manager job for polling.  The job only does data transfer - so conversion from raw bytes to meaningful values moved to the read function.

commit 78da35e
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:22:28 2026 +0100

     IMU class:: use of tildagon-i2c-manager jobs for I2C polling.  get and set_period() methods. Default to sensor I2C polling being Off - automatically activated on first read at 'legacy' rates 40mS for gyro/accelerometer, 1000mS for temperature and steps (now controlled separately from accel/gyro). Uses refactored BMI270 driver.  Use of const to reduce RAM use.  New tildagon_imu_state_t structure for RAM so that lsm6ds3 and bmi270 don't have duplicate static allocations internally.  lsm6ds3 control register set to filter sensor data in sync wtih the intended I2C read poll rate.

commit a78d22c
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:21:32 2026 +0100

    support 16 bit addressing of i2c device registers (e.g. SCD4X)

commit 5ee12dc
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:14:29 2026 +0100

    tildagon_i2c_manager: new task in place of imu task, supports i2c operations running in parallel wtih micropython for imu, but also any other i2c transaction can now take advantage of this parallelism via C callbacks for C/micropython 'jobs'.  micropython API provided for 'jobs' comprising up to 5 steps.  READ/WRITE/READ16/WRITE16/CHECK step types.  One-Shot (run_once) or Periodic execution with status monitoring and optional 'Pin.irq' style callback upon completion.  Support for I2C devices with 8 bit and 16 bit register addressing. 10 slots for I2C callbacks/jobs.  Replace extern ad-hoc declarations.

commit 9c3948f
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:01:48 2026 +0100

    IMU - refactored minimal bmi270 driver in place of flow3r one, with support for setting read/update period and hence internal filters to match I2C polling period.

commit f10ecb8
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 22:51:16 2026 +0100

    Feat/utc settings (emfcamp#440)

    * add utc offset to settings

    * add utc offset to settings

    * store seconds use offset as label

    * fix formating

commit 1fe0fad
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 22:21:36 2026 +0100

    keyboard enter done in TextDialog (emfcamp#443)

    Allows the enter key to trigger Done in a TextDialog

commit f2f6a3d
Author: Matthew Wilkes <[email protected]>
Date:   Mon Sep 14 22:19:22 2026 +0100

    Add RMT RX peripheral (emfcamp#425)

    Backports micropython/micropython#18454 from MP 1.29 (or later)

commit 9b833f0
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 21:28:10 2026 +0100

    add ntpsync service (emfcamp#442)

commit ee80b27
Author: Christopher Barnes <[email protected]>
Date:   Mon Sep 14 20:19:09 2026 +0100

    Change FreeRTOS tick rate to 1mS (emfcamp#456)
Robotmad added a commit to TeamRobotmad/badge-2024-software that referenced this pull request Sep 22, 2026
commit 71f5e11
Author: robotmad <[email protected]>
Date:   Fri Sep 18 00:39:04 2026 +0100

    update callaback arguments in interrupts-in-space files

commit 68c6ca4
Author: robotmad <[email protected]>
Date:   Thu Sep 17 23:51:49 2026 +0100

    update as per changes to aw9523b.h

commit c987957
Author: robotmad <[email protected]>
Date:   Thu Sep 17 23:51:04 2026 +0100

    Squashed commit of the following:

    commit a2e7dd0
    Author: Chris <[email protected]>
    Date:   Wed Aug 5 22:16:04 2026 +0100

        interrupt driven spaceagon

        buttons, joystick and touch running on interrupts. PMIC status read limited to rate of PMIC ADC (1Hz)

commit 3674e33
Author: robotmad <[email protected]>
Date:   Thu Sep 17 23:46:50 2026 +0100

    Merge branch 'i2c-scan-selective'

commit beb9122
Author: robotmad <[email protected]>
Date:   Thu Sep 17 23:40:48 2026 +0100

    memory saving from eliminating callback args - hence only need to remember the callback function as pin/port can be reconstructed.

commit 398a2ce
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:25:59 2026 +0100

    use TILDAGON_XXX_I2C_PORT definitions in place of magic numbers for I2C mux ports

commit 83e1411
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:25:32 2026 +0100

    GPIO pins via AW9523B: cache output state, direction and mode in RAM. Use tildagon-i2c-manager one-shot C callback job for the last write of any action so that micropython can return and leave that to take place in parallel.  FreeRTOS Semaphore used to mange serialisation of I2C access for maximum performance.  Move toggle to C layer to take advantage of caching. Update fakes for Pin and ePin.

commit ffc479b
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:23:27 2026 +0100

    Frontboard 2026 compass - use tildagon-i2c-manager job for polling.  The job only does data transfer - so conversion from raw bytes to meaningful values moved to the read function.

commit 78da35e
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:22:28 2026 +0100

     IMU class:: use of tildagon-i2c-manager jobs for I2C polling.  get and set_period() methods. Default to sensor I2C polling being Off - automatically activated on first read at 'legacy' rates 40mS for gyro/accelerometer, 1000mS for temperature and steps (now controlled separately from accel/gyro). Uses refactored BMI270 driver.  Use of const to reduce RAM use.  New tildagon_imu_state_t structure for RAM so that lsm6ds3 and bmi270 don't have duplicate static allocations internally.  lsm6ds3 control register set to filter sensor data in sync wtih the intended I2C read poll rate.

commit a78d22c
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:21:32 2026 +0100

    support 16 bit addressing of i2c device registers (e.g. SCD4X)

commit 5ee12dc
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:14:29 2026 +0100

    tildagon_i2c_manager: new task in place of imu task, supports i2c operations running in parallel wtih micropython for imu, but also any other i2c transaction can now take advantage of this parallelism via C callbacks for C/micropython 'jobs'.  micropython API provided for 'jobs' comprising up to 5 steps.  READ/WRITE/READ16/WRITE16/CHECK step types.  One-Shot (run_once) or Periodic execution with status monitoring and optional 'Pin.irq' style callback upon completion.  Support for I2C devices with 8 bit and 16 bit register addressing. 10 slots for I2C callbacks/jobs.  Replace extern ad-hoc declarations.

commit 9c3948f
Author: robotmad <[email protected]>
Date:   Tue Sep 15 21:01:48 2026 +0100

    IMU - refactored minimal bmi270 driver in place of flow3r one, with support for setting read/update period and hence internal filters to match I2C polling period.

commit f10ecb8
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 22:51:16 2026 +0100

    Feat/utc settings (emfcamp#440)

    * add utc offset to settings

    * add utc offset to settings

    * store seconds use offset as label

    * fix formating

commit 1fe0fad
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 22:21:36 2026 +0100

    keyboard enter done in TextDialog (emfcamp#443)

    Allows the enter key to trigger Done in a TextDialog

commit f2f6a3d
Author: Matthew Wilkes <[email protected]>
Date:   Mon Sep 14 22:19:22 2026 +0100

    Add RMT RX peripheral (emfcamp#425)

    Backports micropython/micropython#18454 from MP 1.29 (or later)

commit 9b833f0
Author: Sam Machin <[email protected]>
Date:   Mon Sep 14 21:28:10 2026 +0100

    add ntpsync service (emfcamp#442)

commit ee80b27
Author: Christopher Barnes <[email protected]>
Date:   Mon Sep 14 20:19:09 2026 +0100

    Change FreeRTOS tick rate to 1mS (emfcamp#456)

commit 42c2a0f
Author: Sam Machin <[email protected]>
Date:   Thu Aug 6 22:15:47 2026 +0200

    add missing chars  in text dialog (emfcamp#433)
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