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

Zephyr v3.7 #49

Merged
merged 6 commits into from
Aug 16, 2024
Merged

Zephyr v3.7 #49

merged 6 commits into from
Aug 16, 2024

Conversation

yashi
Copy link
Member

@yashi yashi commented Aug 16, 2024

Please test

yashi added 6 commits August 16, 2024 15:52
SC-Sat1 will be flying with Zephyr v3.7. Since the codebase was
targeting v3.6, the API changes in v3.7 caused some breakages. These
are fixed in the following commits.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This ports Main board to HWMv2.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This ports ADCS board to HWMv2.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
CAN_DT_DRIVER_CONFIG_INST_GET() takes minimum bitrate now.  This
change was introduced in zephyrproject-rtos/zephyr@6d35ec718fcb173.

    drivers: can: add support for specifying minimum supported CAN bitrate

    Add support for specifying the minimum bitrate supported by a CAN
    controller in CAN_DT_DRIVER_CONFIG_GET() and
    CAN_DT_DRIVER_CONFIG_INST_GET().

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
CONFIG_CAN_AUTO_BUS_OFF_RECOVERY has been reworked and renamed to
CONFIG_CAN_MANUAL_RECOVERY_MODE. Note that the config has the opposite
meaning, so #ifndef has been changed to #ifdef.

Here is the original commit message:

    drivers: can: rework support for manual bus-off recovery

    Since all CAN controllers drivers seem to support automatic recovery (for
    any future drivers for hardware without this hardware capability this can
    easily be implemented in the driver), change the Zephyr CAN controller API
    policy to:

    - Always enable automatic bus recovery upon driver initialization,
      regardless of Kconfig options. Since CAN controllers are initialized in
      "stopped" state, no unwanted bus-off recovery will be started at this
      point.

    - Invert and rename the Kconfig CONFIG_CAN_AUTO_BUS_OFF_RECOVERY, which is
      enabled by default, to CONFIG_CAN_MANUAL_RECOVERY_MODE, which is disabled
      by default. Enabling CONFIG_CAN_MANUAL_RECOVERY_MODE=y enables support
      for the can_recover() API function and a new manual recovery mode (see
      next bullet). Keeping this guarded by Kconfig allows keeping the flash
      footprint down for applications not using manual bus-off recovery.

    - Introduce a new CAN controller operational mode
      CAN_MODE_MANUAL_RECOVERY. Support for this is only enabled if
      CONFIG_CAN_MANUAL_RECOVERY_MODE=y. Having this as a mode allows
      applications to inquire whether the CAN controller supports manual
      recovery mode via the can_get_capabilities() API function and either fail
      or rely on automatic recovery - and it allows CAN controller drivers not
      supporting manual recovery mode to fail early in can_set_mode() during
      application startup instead of failing when can_recover() is called at a
      later point in time.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This change was introduced in
zephyrproject-rtos/zephyr@68096cedaec816f7bfa46.

Here is the original commit message:

    drivers: can: rename struct can_driver_config fields

    Rename the "bus_speed" and "bus_speed_data" fields of struct
    can_driver_config to "bitrate" and "bitrate_data" to match the
    corresponding devicetree properties and the terminology used in the rest of
    the CAN subsystem API.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
@yashi yashi requested a review from sasataku as a code owner August 16, 2024 06:53
@sasataku
Copy link
Member

Thanks a lot.
I've tested on the actual boards (SC-Sat1 MAIN/ADCS), and works well.
Let's merge.

@sasataku sasataku merged commit ad96a12 into spacecubics:main Aug 16, 2024
17 checks passed
@yashi yashi deleted the zephyr-v3.7 branch August 16, 2024 08:25
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