[WIP] gs_usb: error frames and FD#38
Draft
BenGardiner wants to merge 7 commits intoToyotaInfoTech:mainfrom
Draft
[WIP] gs_usb: error frames and FD#38BenGardiner wants to merge 7 commits intoToyotaInfoTech:mainfrom
BenGardiner wants to merge 7 commits intoToyotaInfoTech:mainfrom
Conversation
a25ec5c to
4d9223c
Compare
🔨 Build & Macro Coverage ReportDefault Builds — Hex File Sizes
Macro Coverage Build Results
Source Code Compile Coverage
Full ENABLE_ Macro Coverage Table
|
Contributor
Author
|
@CamilleTTT that PR #39 worked. The github actions are fixed and see above for the results of the macro matrix coverage stuff. |
Contributor
Author
|
@CamilleTTT also check out the results of the CI runs on main branch: e.g. https://github.com/ToyotaInfoTech/RAMN/actions/runs/22617100240 |
Fix gs_usb interface shortcomings: * data bitrate init * endpoint error check * marshal/unmarshal frame offsets * vendor request parsing * add DLC conversion functions * add CAN-FD feature flags
Add RAMN_GSUSB_SendErrorFrame() that constructs SocketCAN error frames from FDCAN error state (bus off, error passive/warning, protocol errors) and sends them through the gs_usb interface. - Map FDCAN BusOff to CAN_ERR_BUSOFF - Map FDCAN ErrorPassive/Warning to CAN_ERR_CRTL with data[1] flags - Map FDCAN protocol errors (stuff, form, ack, bit, CRC) to CAN_ERR_PROT - Call from RAMN_ErrorTaskFunc when ENABLE_GSUSB is active - Remove "Error frames are not reported" from ramn_config.h limitations - Remove TODO comment from main.c
Enable CAN-FD frame handling through the gs_usb (candlelight/SocketCAN) interface, controlled by the host via GS_CAN_MODE_FD flag: - Add GS_CAN_FLAG_FD/BRS/ESI frame flag defines per gs_usb protocol - Advertise GS_CAN_FEATURE_FD in device capabilities - Handle GS_CAN_MODE_FD in breq_set_mode to set enable_fdcan - Update RAMN_GSUSB_ProcessRX to accept FD frames with FD/BRS/ESI flags - Update RAMN_GSUSB_ProcessTX to set FD/BRS flags on TX echo frames - Update RAMN_RxTask2Func TX path to decode FD/BRS/ESI flags from host - Fix marshal/unmarshal to use FDCAN_ConvertToActual for data copy size (DLC codes 9-15 map to 12-64 bytes, not 9-15 bytes) - Remove "CAN-FD is not supported" from ramn_config.h limitations
4d9223c to
a25c12f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.