Skip to content

Commit

Permalink
Merge pull request #160 from sifive/fix_spi_chip_select
Browse files Browse the repository at this point in the history
Fixed the cs pin assignment.
  • Loading branch information
nategraff-sifive authored Aug 21, 2019
2 parents ed17060 + 6d40241 commit 438d54e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/sifive_spi0.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static int configure_spi(struct __metal_driver_sifive_spi0 *spi,
}

/* Set CS line */
METAL_SPI_REGW(METAL_SIFIVE_SPI0_CSID) = config->csid;
METAL_SPI_REGW(METAL_SIFIVE_SPI0_CSID) = 1 << (config->csid);

/* Toggle off memory-mapped SPI flash mode, toggle on programmable IO mode
* It seems that with this line uncommented, the debugger cannot have access
Expand Down

0 comments on commit 438d54e

Please sign in to comment.