Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPI Slave Select GPIO Configuration / spi_me10.c #1019

Open
demiromerb opened this issue May 15, 2024 · 0 comments
Open

SPI Slave Select GPIO Configuration / spi_me10.c #1019

demiromerb opened this issue May 15, 2024 · 0 comments

Comments

@demiromerb
Copy link

Function : int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numSlaves,
unsigned ssPolarity, unsigned int hz)
File : PeriphDrivers/Source/SPI/spi_me10.c

This SPI init function for ME10 configures Slave Select(SSEL) 0 pin by default if selected SPI is SPI0 but does not configure any SSEL pins if any other SPI modules are used.

There is MXC_SPI_SetSlave function but it does not configure the GPIO settings for the SSEL pin either(Selecting alternate function for the GPIO).

For ME18 (spi_me18.c) the MXC_SPI_Init function takes one more argument with prototype "mxc_spi_pins_t pins" which stores the SSEL pins to be used and the function configures the GPIO and SPI accordingly.

So, I could not find any other way for using, for example, SPI2 with SSEL1 on ME10 by configuring the GPIO settings for SSEL1 manually, which does not seem very customer friendly and reduces the code readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant