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

capsules: add mx25r6435f flash chip #978

merged 3 commits into from Jul 2, 2018


None yet
4 participants
Copy link

bradjc commented Jun 11, 2018

Used on nrf52840dk.

Pull Request Overview

This pull request adds a driver for the mx25r6435f flash chip used on the nrf52840dk board.

Testing Strategy

This pull request was tested by running the nonvolatile_storage test app.

TODO or Help Wanted

I'm not sure how to get the nrf52dk to work as well without making nrf52_base super messy, since it does not have the flash chip.

Documentation Updated

  • Kernel: Updated the relevant files in /docs, or no updates are required.
  • Userland: Added/updated the application README, if needed.


  • Ran make formatall.

@bradjc bradjc added the help wanted label Jun 11, 2018

/// An example looks like:
/// ```
/// static mut PAGEBUFFER: Mx25r6435fPage = Mx25r6435fPage::new();

This comment has been minimized.


eupn Jun 20, 2018


Example code is inconsistent with the type declared below.

Mx25r6435fSector != Mx25r6435fPage.


This comment has been minimized.

Copy link

bradjc commented Jun 21, 2018

This PR is a pretty straightforward addition of a new IC driver, except Nordic only put this flash chip on the nrf52840dk board and not the nrf52dk. I combined the two files before I knew this and now I'm not sure if there is a reasonable way to add it to one but not the other. In particular, adding it to the Platform struct for one but not the other is tricky:

pub struct Platform {
ble_radio: &'static capsules::ble_advertising_driver::BLE<
VirtualMuxAlarm<'static, Rtc>,
button: &'static capsules::button::Button<'static, nrf5x::gpio::GPIOPin>,
console: &'static capsules::console::Console<'static, nrf52::uart::Uarte>,
gpio: &'static capsules::gpio::GPIO<'static, nrf5x::gpio::GPIOPin>,
led: &'static capsules::led::LED<'static, nrf5x::gpio::GPIOPin>,
rng: &'static capsules::rng::SimpleRng<'static, nrf5x::trng::Trng<'static>>,
temp: &'static capsules::temperature::TemperatureSensor<'static>,
ipc: kernel::ipc::IPC,
alarm: &'static capsules::alarm::AlarmDriver<
capsules::virtual_alarm::VirtualMuxAlarm<'static, nrf5x::rtc::Rtc>,
nonvolatile_storage: &'static capsules::nonvolatile_storage_driver::NonvolatileStorage<'static>,

The only ideas I have are to go back to separate files or to switch all the way to the component setup as in #1012. I'm wondering if anyone else has a spark of inspiration.

capsules: add mx25r6435f flash chip
Used on nrf52840dk.

@bradjc bradjc force-pushed the nrf52840dk-flash branch from dc47e2a to 299ef9e Jun 27, 2018

bradjc added some commits Jun 27, 2018

@bradjc bradjc force-pushed the nrf52840dk-flash branch from 299ef9e to 815d95f Jun 27, 2018

@bradjc bradjc added P-Upkeep and removed help wanted labels Jun 27, 2018


This comment has been minimized.

Copy link

bradjc commented Jun 27, 2018

OK I remembered that Option exists and came up with a way to handle this. Please take a look.

@alevy alevy merged commit 7abda7a into master Jul 2, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
deploy/netlify Deploy preview ready!

@alevy alevy deleted the nrf52840dk-flash branch Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment