-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Drivers: Mbed application shield fails in Mbed OS 5.15.0 - LCD Screen SPI interface #12435
Comments
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2547 |
Hi C12832 is using _spi(mosi,NC,sck) Issue came with static pinmap feature. |
I looked at this briefly with @bertfroeba . It looks like static pinmap feature made some changes that affect this. It is in the generic implementation for spi. @mprse would you be able to look at this? cc @ARMmbed/mbed-os-hal |
Yes, I'm looking into this right now. |
While working on the fix for this issue I noticed some inconsistency I need consultation. Line 109 in c12b433
In our driver's layer, we assume that we can specify mbed-os/targets/TARGET_STM/stm_spi_api.c Lines 248 to 252 in c12b433
On the SPI feature branch, we allow 3-wire mode, but I'm not sure how this should work here. Should we drop configuring half-duplex mode if |
The SPI_DIRECTION_2LINES is indeed an ST implementation choice for a specific sensor that works only in 3-wire mode. that means that MOSI line will be used to send and to receive data. The MISO line is declared as NC and is indeed Not Connected (and not used). The comment in SPI.h just states that if NC the line is not used, it doesn't say that you will only write or only read, so I 'm not sure which inconsistency you're seeing ? When the driver tries to read from an SPI driver instance configured with MOSI only, then it assumes the 3-wire mode. In a case of a Display driver, I would assume that it will only write and not try to read at all ... What is the actual problem ? |
@LMESTM Thanks for the response. I will leave 3-wire mode available, create a patch and ask for a review. |
Fix can be found here: PR #12460. |
Allow MISO/MOSI set to NC during SPI initialisation (fix for issue #12435)
@0xc0170 can we close this one ? |
Description of defect
Using the sample code for the C12832 LCD screen on an Mbed Application Shield:
This causes an error at runtime as one of the pins is set to NC
This appears to be due to the SPI in C12832 being declared with
miso == NC
which was acceptable in mbed os < 5.15The SPI.h file indicates that it is okay for miso to be set to NC
Target(s) affected by this defect ?
Tested and fails in:
Toolchain(s) (name and version) displaying this defect ?
Fails in both:
What version of Mbed-os are you using (tag or sha) ?
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
How is this defect reproduced ?
Create above sample code and run on the device with mbed os 5.15 or above
The text was updated successfully, but these errors were encountered: