-
Notifications
You must be signed in to change notification settings - Fork 3k
EFM32 PeripheralPins.c #7424
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
Comments
ARM Internal Ref: MBOTRIAGE-1087 |
@ARMmbed/team-silabs Please review |
This has been a long-standing issue. In my eyes it is not a bug, but a shortcoming of how the mbed APIs map onto the Silicon Labs GPIO architecture. I'd rather have seen mbed APIs take location numbers instead of pins, but it is what it is. As it stands, the HAL needs to figure out which peripheral a user wants to initialise based on the pins it is given. The time-space constraint tradeoff we made is to map each pin statically to a peripheral. @DBS06 I like your suggestion about making the configuration tables weakly defined. I'll put it on the todo-list. Would that solve your immediate needs? |
@stevew817 making the configuration tables weakly defined would help. I already changed it locally, I can do a PR, because I would prefer to have it in the mbed-OS master and not on my local master, because of maintenance reasons.
Therefore I renamed my own |
@stevew817 I made the PR #7491. I did it for all EFM32 targets, because I assume this issue is not only for the EFM32PG12. Please look over if I maybe forgot something. |
… overridable. See issue "ARMmbed#7424 (comment)"
… overridable. See issue "#7424 (comment)"
… overridable. See issue "#7424 (comment)"
… overridable. See issue "ARMmbed#7424 (comment)"
Description
Target: EFM32PG12B500F1024GL125
I tried to use a different USARTn for SPI (in EFM32PG12_STK3402 USART2 is used) and looked inside the "EFM32PG12 Family Data Sheet - Chapter 6.4 Alternate Functionality Overview" and for USART3 the Profile No.1 should work for me.
Therefore I tried to create an SPIF object like this:
PinNames.h:
usage:
According to the datasheet and mbed reference this should work on the fly, but reality is a b****.
I found out that the Alternate Functionality Profiles are hard coded in ".\mbed-os\targets\TARGET_Silicon_Labs\TARGET_EFM32\TARGET_EFM32PG12\PeripheralPins.c" and the pins I would like to use for the SPI are mapped/pinned to the USART0, but USART0 is already used for USBTX/-RX.
So what happens inside the µC initialization:
Ok so far so bad, for testing purposes I deleted the Alternate Functionality Profile No.17 for USART0 and added with the same pin setting to USART3 with Profile No.1 the file looks now like this:
PeripheralPins.c
From my point of view I identified the following problems ("bugs"):
__attribute__((weak))
is missing for these configuration arrays.Issue request type
[ ] Question
[ ] Enhancement
[X] Bug
The text was updated successfully, but these errors were encountered: