Skip to content

Issue with SPIWriteReg  #3

@AbhishekGNair

Description

@AbhishekGNair

Hi Morgan,

I am looking to program an Arduino to talk with the AFE4400 and found your code very helpful as a starting point. That said, I think I have discovered an issue with the SPIWriteReg(byte regAddress, uint32_t regValue) function. When I am trying to write values less than 16 bits wide, I am getting wrong values out of the registers using SPIReadReg(byte regAddress). I think this is because the >>16 and >>8 shifts in the code don't work well when the data is less than 16 bits long. Are you aware of this issue? I will continue to chip away and will update you if I find anything useful.

Thanks again.

Regards,
AGN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions