-
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
QSPI : Define default pins at drivers level #11444
Changes from all commits
bec463d
03837a7
5c1c558
f117d35
23e6840
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,27 @@ | ||
{ | ||
"name": "qspif", | ||
"config": { | ||
"QSPI_IO0": "QSPI_FLASH1_IO0", | ||
"QSPI_IO1": "QSPI_FLASH1_IO1", | ||
"QSPI_IO2": "QSPI_FLASH1_IO2", | ||
"QSPI_IO3": "QSPI_FLASH1_IO3", | ||
"QSPI_SCK": "QSPI_FLASH1_SCK", | ||
"QSPI_CSN": "QSPI_FLASH1_CSN", | ||
"QSPI_IO0": "MBED_CONF_DRIVERS_QSPI_IO0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jeromecoutant what I'm saying is these new configs like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MBED_CONF_DRIVERS_QSPI_IO0 is set by default to QSPI_FLASH1_IO0, Difference, now, is that when user adds some external QSPI memory, he only has to update his mbed_app.json file. Then he could execute QSPIF AND QSPI tests. Thx There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks it work // Automatically generated configuration file.
// DO NOT EDIT, content will be overwritten.
#ifndef __MBED_CONFIG_DATA__
#define __MBED_CONFIG_DATA__
// Configuration parameters
...
#define MBED_CONF_DRIVERS_QSPI_CSN QSPI_FLASH1_CSN // set by library:drivers
#define MBED_CONF_DRIVERS_QSPI_IO0 QSPI_FLASH1_IO0 // set by library:drivers
#define MBED_CONF_DRIVERS_QSPI_IO1 QSPI_FLASH1_IO1 // set by library:drivers
#define MBED_CONF_DRIVERS_QSPI_IO2 QSPI_FLASH1_IO2 // set by library:drivers
#define MBED_CONF_DRIVERS_QSPI_IO3 QSPI_FLASH1_IO3 // set by library:drivers
#define MBED_CONF_DRIVERS_QSPI_SCK QSPI_FLASH1_SCK // set by library:drivers
... |
||
"QSPI_IO1": "MBED_CONF_DRIVERS_QSPI_IO1", | ||
"QSPI_IO2": "MBED_CONF_DRIVERS_QSPI_IO2", | ||
"QSPI_IO3": "MBED_CONF_DRIVERS_QSPI_IO3", | ||
"QSPI_SCK": "MBED_CONF_DRIVERS_QSPI_SCK", | ||
"QSPI_CSN": "MBED_CONF_DRIVERS_QSPI_CSN", | ||
"QSPI_POLARITY_MODE": 0, | ||
"QSPI_FREQ": "40000000", | ||
"QSPI_MIN_READ_SIZE": "1", | ||
"QSPI_MIN_PROG_SIZE": "1" | ||
}, | ||
"target_overrides": { | ||
"DISCO_F413ZH": { | ||
"QSPI_FREQ": "80000000" | ||
}, | ||
"DISCO_L475VG_IOT01A": { | ||
"MX25R6435F": { | ||
"QSPI_FREQ": "8000000" | ||
}, | ||
"DISCO_L476VG": { | ||
"QSPI_FREQ": "80000000" | ||
}, | ||
"DISCO_L496AG": { | ||
"MX25L51245G": { | ||
"QSPI_FREQ": "8000000" | ||
}, | ||
"DISCO_F469NI": { | ||
"N25Q128A": { | ||
"QSPI_FREQ": "80000000" | ||
}, | ||
"DISCO_F746NG": { | ||
"QSPI_FREQ": "80000000" | ||
}, | ||
"DISCO_F769NI": { | ||
"QSPI_FREQ": "8000000" | ||
}, | ||
"MCU_NRF52840": { | ||
"QSPI_FREQ": "32000000", | ||
"QSPI_MIN_READ_SIZE": "4", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,30 @@ | |
"spi_count_max": { | ||
"help": "The maximum number of SPI peripherals used at the same time. Determines RAM allocated for SPI peripheral management. If null, limit determined by hardware.", | ||
"value": null | ||
}, | ||
"qspi_io0": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have Why are not these in PinNames and defined for all boards having QSPI? There are QSPI pins or not? They should provide default pins, that could be overriden in tests/apps via config. Is this what is it adding? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Goal is to use an external QSPI, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand now. This is a new approach here in this drivers config. This brings QSPI definitions even for a board that does not have it. Shouldn' t this be by default null, not even created if not used , and a target would override it and set? @maciejbocianski what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Goal of this approach is to be full compatible with current implementation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only impact having QSPI defined always even if QSPI is not available? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4 new define added and not used in the mbed_config.h file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help text is missing. |
||
"help": "QSPI data I/O 0 pin", | ||
"value": "QSPI_FLASH1_IO0" | ||
}, | ||
"qspi_io1": { | ||
"help": "QSPI data I/O 1 pin", | ||
"value": "QSPI_FLASH1_IO1" | ||
}, | ||
"qspi_io2": { | ||
"help": "QSPI data I/O 2 pin", | ||
"value": "QSPI_FLASH1_IO2" | ||
}, | ||
"qspi_io3": { | ||
"help": "QSPI data I/O 3 pin", | ||
"value": "QSPI_FLASH1_IO3" | ||
}, | ||
"qspi_sck": { | ||
"help": "QSPI clock pin", | ||
"value": "QSPI_FLASH1_SCK" | ||
}, | ||
"qspi_csn": { | ||
"help": "QSPI chip select pin", | ||
"value": "QSPI_FLASH1_CSN" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was designed that
tests-mbed_hal-qspi
uses default qspi interface available on dev boards.This should look rather like below to maintain hal test working:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the difference as MBED_CONF_DRIVERS_QSPI_IO0 is QSPI_FLASH1_IO0...