Skip to content

Renesas RA: confirm POSR/PORR halfword polarity on hardware #5107

Closed

Description

@zackees

Found while reviewing #5103. R7FA4M1AB.h (Arduino Renesas core 1.6.0) disagrees with itself: PCNTR3_b puts POSR at bits 15..0 and PORR at bits 31..16, while the halfword overlay declares PORR at offset 0x08 and POSR at 0x0A. Core SoftwareSerial writes PCNTR3 with set bits in the low half.

On a little-endian bus those views conflict. If the bitfield view is the true one, _ARMPIN::hi() and lo() drive the opposite level, as does the sport()/cport() data path in #5103. hi()/lo() already use these names on master, so #5103 does not introduce the question. The PDR/PODR halfwords have the same layout conflict, and clockless_arm_renesas.h writes PODR.

No hardware or waveform has checked this. To settle it: on a UNO R4 WiFi, confirm FastPin<N>::hi() drives the pin high and that software SPI data on a scope matches the sent bytes. Check the RA4M1 manual address tables too. Fix the accessors if polarity is wrong.

Activity

  1. added
    sanitized
    on Nov 6, 2026
  2. moved this from Triage to Done in FastLED Trackeron Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions