configs/flipnclick-pic32mz: Fix some SPI bus confusion; update README.

This commit is contained in:
Gregory Nutt 2018-02-10 11:45:12 -06:00
parent 642d7e3ce2
commit dd56cc87be
2 changed files with 36 additions and 28 deletions

View File

@ -30,10 +30,17 @@ Port Status
point, I have not even figured out how I am going to load and debug
new firmware.
2018-02-08: I received a mikroProg PIC32 debugger (Thanks go to John Legg
of the Debug Shop!). At this point I have loaded code and can see the
NSH prompt coming from the Flip&Click connect via an RS-232 Click board
in mikroBUS slot A. But there is no response to serial input to the
board. Sounds like a pin configuration issue.
of the Debug Shop!).
2018-02-09: The NSH configuration is now functional, but only with the
RS-232 Click in mikroBUS slot B. There is, apparently, some mis-
information about how UART4 RX is connected in mikroBUS slot A; I
cannot receive serial there. But life is good in slot B.
2018-02-10: Added the nxlines configuration to test the custom HiletGo
OLED on a Click proto board. Debug output indicates that the example is
running error free yet nothing appears on the OLED in mikroBUS slot A.
It looks like all of the signals are present at the mikroBUS A slot and
the proto click ohms out okay so this must be a software driver issue.
Write only LCDs are tough to debug!
On Board Debug Support
======================
@ -420,5 +427,6 @@ Where <subdir> is one of the following:
2018-02-10: The debug output indicates that the nxlines example is
running with no errors, however, nothing appears on the OLED display.
This suggests either a problem with the pin configuration or else I
have bungled the wiring of the custom card.
It looks like all of the signals are present at the mikroBUS A slot and
the proto click ohms out okay so this must be a software driver issue.
Write only LCDs are tough to debug!

View File

@ -111,8 +111,8 @@ void pic32mz_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selecte
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBA) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB)
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBC) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD)
if (devid == SPIDEV_DISPLAY(0))
{
pic32mz_gpiowrite(GPIO_HILETGO_CS, !selected);
@ -128,26 +128,26 @@ uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
#ifdef CONFIG_SPI_CMDDATA
int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBA) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB)
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBC) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD)
if (devid == SPIDEV_DISPLAY(0))
{
pic32mz_gpiowrite(GPIO_HILETGO_CS, !cmd);
pic32mz_gpiowrite(GPIO_HILETGO_DC, !cmd);
}
#endif
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI1 */
#ifdef CONFIG_PIC32MZ_SPI2
void pic32mz_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBC) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD)
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBA) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB)
if (devid == SPIDEV_DISPLAY(0))
{
pic32mz_gpiowrite(GPIO_HILETGO_CS, !selected);
@ -163,17 +163,17 @@ uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
#ifdef CONFIG_SPI_CMDDATA
int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBC) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBD)
#if defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBA) || \
defined(CONFIG_FLIPNCLICK_PIC32MZ_HILETGO_MBB)
if (devid == SPIDEV_DISPLAY(0))
{
pic32mz_gpiowrite(GPIO_HILETGO_CS, !cmd);
pic32mz_gpiowrite(GPIO_HILETGO_DC, !cmd);
}
#endif
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI2 */
#ifdef CONFIG_PIC32MZ_SPI3
void pic32mz_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
@ -192,7 +192,7 @@ int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI3 */
#ifdef CONFIG_PIC32MZ_SPI4
void pic32mz_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
@ -211,7 +211,7 @@ int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI4 */
#ifdef CONFIG_PIC32MZ_SPI5
void pic32mz_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
@ -232,7 +232,7 @@ int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI5 */
#ifdef CONFIG_PIC32MZ_SPI6
void pic32mz_spi6select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
@ -254,7 +254,7 @@ int pic32mz_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
return 0;
}
#endif
#endif
#endif /* CONFIG_PIC32MZ_SPI6 */
/****************************************************************************
* Name: pic32mz_spi1/2/...register
@ -284,7 +284,7 @@ int pic32mz_spi1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI1 */
#ifdef CONFIG_PIC32MZ_SPI2
int pic32mz_spi2register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
@ -293,7 +293,7 @@ int pic32mz_spi2register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI2 */
#ifdef CONFIG_PIC32MZ_SPI3
int pic32mz_spi3register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
@ -302,7 +302,7 @@ int pic32mz_spi3register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI3 */
#ifdef CONFIG_PIC32MZ_SPI4
int pic32mz_spi4register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
@ -311,7 +311,7 @@ int pic32mz_spi4register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI4 */
#ifdef CONFIG_PIC32MZ_SPI5
int pic32mz_spi5register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
@ -320,7 +320,7 @@ int pic32mz_spi5register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI5 */
#ifdef CONFIG_PIC32MZ_SPI6
int pic32mz_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
@ -329,7 +329,7 @@ int pic32mz_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
#warning Missing logic
return -ENOSYS;
}
#endif
#endif /* CONFIG_PIC32MZ_SPI6 */
#endif /* CONFIG_SPI_CALLBACK */
#endif /* CONFIG_PIC32MZ_SPI */