Skip to content

ss_spi.c: fix CTRLR0 write in ss_spi_set_data_mode() #340

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

Closed
wants to merge 1 commit into from

Conversation

eriknyquist
Copy link
Contributor

This fixes two existing issues with the current implementation;

  1. The value to be written (ctrl) is completely overwritten on line 107,
    erasing the previous modifications (perhaps instead of a bitwise-OR?)
  2. On the same line- the 'dataMode' value should be shifted by 4, not by 6
    (see Quark SE C1000 datasheet, Table 229 "Detailed Description of
    Control Register 0 (CTRLR0) for reference)

@bigdinotech @SidLeung @russmcinnis please review & test

This fixes two existing issues with the current implementation;
  1. The value to be written (ctrl) is completely overwritten on line 107,
     erasing the previous modifications (perhaps instead of a bitwise-OR?)
  2. On the same line- the 'dataMode' value should be shifted by 4, not by 6
     (see Quark SE C1000 datasheet, Table 229 "Detailed Description of
      Control Register 0 (CTRLR0) for reference)
@russmcinnis
Copy link
Contributor

I just tested setting SPI_MODE0. It isn't hanging, but I haven't verified functionality. I am still seeing the issue with reading all 0s from the SPI FRAM though.

@eriknyquist
Copy link
Contributor Author

Closing-- this fix is invalid now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants