Skip to content
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

cpu/nrf52: add missing vendor files #14061

Merged
merged 3 commits into from
May 12, 2020
Merged

Conversation

benpicco
Copy link
Contributor

Contribution description

When adding support for nrf52811 (#14008) the vendor file for the new CPU was forgotten.
But then I also noticed we don't include the nrf528xx_peripherals.h files yet, which make life much easier.
Before we start to re-define those constants, better add the proper vendor file.

Testing procedure

Issues/PRs references

needed for #14057

@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: cpu Area: CPU/MCU ports labels May 12, 2020
@benpicco benpicco requested a review from bergzand May 12, 2020 12:55
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 12, 2020
Copy link
Member

@bergzand bergzand left a comment

Choose a reason for hiding this comment

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

Ack

SPI1 and TWI0 share the same IRQ, not SPI1 and TWI1
Copy link
Member

@bergzand bergzand left a comment

Choose a reason for hiding this comment

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

ReACK

@benpicco
Copy link
Contributor Author

We can also do

--- a/cpu/nrf52/include/cpu_conf.h
+++ b/cpu/nrf52/include/cpu_conf.h
@@ -66,14 +66,12 @@ extern "C" {
  * @brief   Flash page configuration
  * @{
  */
-#define FLASHPAGE_SIZE                  (4096U)
-
-#if defined(CPU_MODEL_NRF52811XXAA)
-#define FLASHPAGE_NUMOF                 (48U)
-#elif defined(CPU_MODEL_NRF52832XXAA)
-#define FLASHPAGE_NUMOF                 (128U)
+#ifdef BPROT_PRESENT
+#define FLASHPAGE_SIZE              BPROT_REGIONS_SIZE
+#define FLASHPAGE_NUMOF             BPROT_REGIONS_NUM
 #elif defined(CPU_MODEL_NRF52840XXAA)
-#define FLASHPAGE_NUMOF                 (256U)
+#define FLASHPAGE_SIZE              (4096U)
+#define FLASHPAGE_NUMOF             (256U)
 #endif

now

@bergzand bergzand added State: waiting for other PR State: The PR requires another PR to be merged first and removed State: waiting for other PR State: The PR requires another PR to be merged first labels May 12, 2020
@Citrullin
Copy link
Contributor

Thanks for fixing. Learning by doing :) Next time, I will be aware of it.

@benpicco benpicco merged commit 1ab4ff7 into RIOT-OS:master May 12, 2020
@benpicco benpicco deleted the cpu/nrf5211-fix branch May 12, 2020 14:58
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants