Kyle Kearney
b9d824d67c
Avoid stale mutex in QSPIFBlockDevice::read
...
Update to follow the same `goto exit_point` pattern that is used
by the rest of the functions to avoid leaving the mutex locked
when errors are detected and require the function to abort.
2019-11-18 15:42:08 +00:00
Kyle Kearney
6003dbe6b0
Reuse existing error for _qspi_configure_format
...
Use QSPIF_BD_ERROR_DEVICE_ERROR instead of introducing a new error code.
Add tr_error calls whenever _qspi_configure_format fails to aid in debugging.
2019-11-18 15:42:08 +00:00
Kyle Kearney
2b3ee26f62
Report errors returned by _qspi_configure_format
...
The function returns a qspi_status_t but most usages in QSPIFBlockDevice
assume that it always succeeds.
2019-11-18 15:42:08 +00:00
Kyle Kearney
4917bfabdf
QSPIFBlockDevice: Fix incomplete propagation of qspi_inst_t
2019-11-18 15:42:08 +00:00
Matthew Macovsky
3b86b35616
Introduce qspi_inst_t type for QSPI instructions
...
Encourage the usage of consistent types (there are currently
a mix of `int` and `unsigned int` used for qspi instructions)
QSPI commands are limited to 8 bits, to this is a typdef to char
2019-11-18 15:42:08 +00:00
Matthew Macovsky
53352717a2
Differentiate alt and dummy cycles in QSPIF
...
Propagate separate alt cycle and dummy cycle counts from QSPIFBlockDevice
down to the qspi driver, so that drivers which handle the two separately have
enough information to do so.
2019-10-16 11:58:32 +01:00
Matthew Macovsky
08a2709993
Allow for arbitrary QSPI alt sizes
...
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-10-16 11:58:32 +01:00
Kevin Bracey
a522dcfa0a
Replace deprecated wait calls
2019-07-15 10:13:50 +03:00
Offir Kochalsky
15fdb6ea7e
Update QSPIFBlockDevice.cpp
2019-03-29 17:37:00 +03:00
offirko
e8e0fb4fdf
If QER is undefined: do nothing but log warning and continue
2019-03-28 10:18:16 +02:00
offirko
1a4c11e3b5
Fixed Bus Mode bit mask to select best mode.
...
When setting Quad Enable, either SR1, SR2 or CR setup is required.
Either way register size is up to 2 bytes.
2019-03-20 15:24:46 +02:00
offirko
ce5194f2f8
Fix Bus mode mask and status register write size in
...
some modes in quad enable
2019-03-20 14:27:49 +02:00
j3hill
e9f08cb4d4
NRF5x: min read/write implementation
2019-01-23 09:55:27 -06:00
Philipp Steiner
f0ec813d71
Update Comments
2019-01-17 11:13:16 -06:00
Philipp Steiner
167a3098c8
Add SPIF_ULBPR command also to QSPIFBlockDevice and SPIFReducedBlockDevice
2019-01-17 11:13:16 -06:00
Martin Kojtal
a9ce91686c
Merge pull request #9264 from offirko/offir_qspif_reduce_trace_level
...
reduce info traces to debug level to prevent logs overflow
2019-01-08 12:38:51 +00:00
offirko
a270cffe39
reduce info traces to debug level to prevent logs overflow
2019-01-06 12:11:30 +02:00
Yossi Levy
b17d13e75e
Documnent changes and adding const to get_type method
2018-12-23 14:27:14 +02:00
Yossi Levy
b8b7292d8e
astyle fix
2018-12-23 11:03:45 +02:00
Yossi Levy
1d71fb1c9f
Add get_type method to block devices.
2018-12-23 11:03:45 +02:00
offirko
b79c64ec53
Favor QSPI Bus mode 1-4-4 over QPI
...
QPI may have slightly better performance, but it is not supported by all targets.
It requires register setup between each Read and Program/Erase commands,
which might damage the overall performance eventually.
2018-12-12 10:54:48 +02:00
Martin Kojtal
7d7bfd7bf2
blockdevice: fix components coding style
2018-11-15 07:20:09 +00:00
Offir Kochalsky
2df7258710
Add get_erase_value() support
2018-11-05 12:47:18 +02:00
Offir Kochalsky
020685c473
Added error logging at set QPI
2018-10-16 10:15:36 +03:00
Offir Kochalsky
9b3bca89fd
Enable first fast mode then quad for chips with low power default
2018-10-14 08:54:09 +03:00
Offir Kochalsky
a60552c07d
Return to 1-1-1 mode prior to setting QUAD enable
2018-10-09 15:17:52 +03:00
Offir Kochalsky
794d150a4a
fix unaligned address erase problem
2018-08-28 14:20:07 +03:00
Offir Kochalsky
9920e63d98
Initial QSPIF delivery to mbed-os
2018-08-27 13:02:17 +03:00