Skip to content

Commit

Permalink
mr-canhubk344: Use LPSPI1 (Port P1A) for SD card
Browse files Browse the repository at this point in the history
  • Loading branch information
PetervdPerk-NXP committed Nov 5, 2024
1 parent 117e971 commit ec7ef41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions boards/nxp/mr-canhubk3/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ __EXPORT int board_app_initialize(uintptr_t arg)

/* Configure LPSPI1 peripheral chip select */

s32k3xx_pinconfig(PIN_LPSPI2_PCS);
s32k3xx_pinconfig(PIN_LPSPI1_PCS);

/* Initialize the SPI driver for LPSPI1 */

struct spi_dev_s *g_lpspi2 = s32k3xx_lpspibus_initialize(2);
struct spi_dev_s *g_lpspi1 = s32k3xx_lpspibus_initialize(1);

if (g_lpspi2 == NULL) {
spierr("ERROR: FAILED to initialize LPSPI2\n");
if (g_lpspi1 == NULL) {
spierr("ERROR: FAILED to initialize LPSPI1\n");
return -ENODEV;
}

rv = mmcsd_spislotinitialize(0, 0, g_lpspi2);
rv = mmcsd_spislotinitialize(0, 0, g_lpspi1);

if (rv < 0) {
mcerr("ERROR: Failed to bind SPI port %d to SD slot %d\n",
Expand Down

0 comments on commit ec7ef41

Please sign in to comment.