Skip to content

Feature qspi kinetis #8485

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

Merged
merged 7 commits into from
Oct 23, 2018
Merged

Feature qspi kinetis #8485

merged 7 commits into from
Oct 23, 2018

Conversation

mmahadevan108
Copy link
Contributor

@mmahadevan108 mmahadevan108 commented Oct 19, 2018

Description

  1. Adds QSPI support for KL82Z and K82F
  2. Makes additions to the flash config files in the TESTS directory as the QSPI flash device used on these boards and not entirely compatible with the ones available inside mbed-os
  3. QSPI support is only added for the Freedom boards. Other boards for these SoC's will have to make QSPI additions based on their hardware.

Pull request type

[ ] Fix
[ ] Refactor
[X] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

This should support QSPI on Kinetis devices

Signed-off-by: Mahesh Mahadevan <[email protected]>
This needs a device specific file

Signed-off-by: Mahesh Mahadevan <[email protected]>
Add 16-bit access mode when writing the transfer size to prevent
the QSPI transaction from starting

Signed-off-by: Mahesh Mahadevan <[email protected]>
Add the QSPI pin defines, clock information and flash details

Signed-off-by: Mahesh Mahadevan <[email protected]>
Add the QSPI pin defines, clock information and flash details

Signed-off-by: Mahesh Mahadevan <[email protected]>
1. Add flash config files.
2. Flash used is MX25U3235F, include information for this
   device in the flash config file

Signed-off-by: Mahesh Mahadevan <[email protected]>
@mmahadevan108
Copy link
Contributor Author

cc @0xc0170 @maclobdell

@mmahadevan108
Copy link
Contributor Author

@cmonr

@cmonr cmonr requested a review from a team October 19, 2018 16:10
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single implementation question. Looks wonderful!

#define QSPI_ERASE_BLOCK_32_MAX_TIME 1150000 // 1s
#define QSPI_ERASE_BLOCK_64_MAX_TIME 2300000 // 2s

#define EXTENDED_SPI_ENABLE() \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in a preprocessor macro instead of being an inlined static function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how the tests are written

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in a preprocessor macro instead of being an inlined static function?

@maciejbocianski

Copy link
Contributor

@maciejbocianski maciejbocianski Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmonr @mmahadevan108 @0xc0170
There was two reasons why preprocessor macro was used:

  • it can be easily redefined in target flash config to cover some target specifics TESTS/mbed_hal/qspi/flash_configs/STM/DISCO_L475VG_IOT01A/flash_config.h
  • it prevents cyclic dependency between flash config TESTS/mbed_hal/qspi/flash_configs/MX25RXX35F_config.h and test utils TESTS\mbed_hal\qspi\qspi_test_utils.h

@@ -12,10 +15,11 @@
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* o Neither the name of the copyright holder nor the names of its
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -1,9 +1,12 @@
/*
* The Clear BSD License
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@NirSonnenschein
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

Build : SUCCESS

Build number : 3421
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8485/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

@NirSonnenschein
Copy link
Contributor

exporter build failed because if IAR license issues: retrying:
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

@cmonr
Copy link
Contributor

cmonr commented Oct 22, 2018

Anyone from @ARMmbed/mbed-os-hal available to review?

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 23, 2018

Makes additions to the flash config files in the TESTS directory as the QSPI flash device used on these boards and not entirely compatible with the ones available inside mbed-os

Tests are all green, can you share the logs here (from your email I understood the config for this flash still needed to be done) ?

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for the QSPI tests results

@mmahadevan108
Copy link
Contributor Author

@0xc0170 Below are the QSPI test results for K82F and KL82Z. The email regarding the flash config is for a third target (LPC564XX) that I working on, I will submit that a separate PR once the flash config file is ready.

K82F_QSPI.txt
KL82Z_QSPI.txt

@cmonr cmonr dismissed 0xc0170’s stale review October 23, 2018 17:22

QSPI test results provided. Please rereview.

@cmonr
Copy link
Contributor

cmonr commented Oct 23, 2018

Bringing this in.

@cmonr cmonr merged commit 0db8960 into ARMmbed:master Oct 23, 2018
@mmahadevan108 mmahadevan108 deleted the feature-qspi-kinetis branch October 24, 2018 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants