fix(boards): canhubk3 SD on LPSPI2

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
This commit is contained in:
dirksavage88 authored and Peter van der Perk committed 2026-06-12 20:37:32 +02:00
1 parent 006cb0172c
commit f029c5df26
1 file changed
+10 -10
+10 -10
View File
@@ -46,7 +46,7 @@
#include <px4_platform_common/init.h>
#include <px4_platform/board_determine_hw_info.h>
#if defined(CONFIG_S32K3XX_LPSPI1) && defined(CONFIG_MMCSD)
#if defined(CONFIG_S32K3XX_LPSPI2) && defined(CONFIG_MMCSD)
#include <nuttx/mmcsd.h>
#endif
@@ -100,23 +100,23 @@ __EXPORT int board_app_initialize(uintptr_t arg)
board_determine_hw_info();
#if defined(CONFIG_S32K3XX_LPSPI1) && defined(CONFIG_MMCSD)
/* LPSPI1 *****************************************************************/
#if defined(CONFIG_S32K3XX_LPSPI2) && defined(CONFIG_MMCSD)
/* LPSPI2 *****************************************************************/
/* Configure LPSPI1 peripheral chip select */
/* Configure LPSPI2 peripheral chip select */
s32k3xx_pinconfig(PIN_LPSPI1_PCS);
s32k3xx_pinconfig(PIN_LPSPI2_PCS);
/* Initialize the SPI driver for LPSPI1 */
/* Initialize the SPI driver for LPSPI2 */
struct spi_dev_s *g_lpspi1 = s32k3xx_lpspibus_initialize(1);
struct spi_dev_s *g_lpspi2 = s32k3xx_lpspibus_initialize(2);
if (g_lpspi1 == NULL) {
spierr("ERROR: FAILED to initialize LPSPI1\n");
if (g_lpspi2 == NULL) {
spierr("ERROR: FAILED to initialize LPSPI2\n");
return -ENODEV;
}
rv = mmcsd_spislotinitialize(0, 0, g_lpspi1);
rv = mmcsd_spislotinitialize(0, 0, g_lpspi2);
if (rv < 0) {
mcerr("ERROR: Failed to bind SPI port %d to SD slot %d\n",