Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bsp/dm365/drivers/spi-davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ static int davinci_spi_setup_transfer(struct rt_spi_device *spi,
} else
return -RT_ERROR;

/* the prescaler divides by the requested rate */
if (hz == 0)
{
return -RT_EINVAL;
}

/* Set up SPIFMTn register, unique to this chipselect. */

prescale = davinci_spi_get_prescale(dspi, hz);
Expand Down
Loading