arduino / ArduinoCore-renesas

MIT License
113 stars 79 forks source link

Device-specific .h files do not match Renesas/User's Manual #354

Open mziz opened 4 months ago

mziz commented 4 months ago

The header files (e.g. variants/UNOWIFIR4/includes/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/R7FA4M1AB.h) are out of date with the Renesas repository and are sometimes wrong.

For example, looking at the User's Manual "22.2.12 General PWM Timer Control Register (GTCR)" section, the bit offset for the TPCS field is 24. This matches the definition in the Renesas repo:

#define R_GPT0_GTCR_TPCS_Pos              (24UL)         /*!< TPCS (Bit 24)

However, the code in this repo is off by one:

https://github.com/arduino/ArduinoCore-renesas/blob/a430d9fbfcbea2ae293f842f211f1b5935ffdd90/variants/UNOWIFIR4/includes/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/R7FA4M1AB.h#L14441

 #define R_GPT0_GTCR_TPCS_Pos              (23UL)         /*!< TPCS (Bit 23)                                         */

Please update the device-specific headers in this repository to match the up to date Renesas headers.