Skip to content

Nano 33 BLE: SPI Max Freq is 8 Mhz? #66

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

Open
mjs513 opened this issue Feb 4, 2025 · 1 comment
Open

Nano 33 BLE: SPI Max Freq is 8 Mhz? #66

mjs513 opened this issue Feb 4, 2025 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@mjs513
Copy link

mjs513 commented Feb 4, 2025

Testing on the nano 33 (ble and sense) shows the Max SPI is 8Mhz. According to the data sheet the Max clock for SPI is suppose to be 32Mhz.

Setting the clock to 30 mhz in begin transaction:

Image

Sketch used:

#include <SPI.h>
#define SPIX SPI
#define CS_PIN 6
void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 5000) {}
  Serial.print("\nBefore SPI.begin: type any character to start\n");
  while (!Serial.available()) {
    yield();
  }
  SPIX.begin();
  Serial.print("\nAfter SPI.begin: type any character to start\n");
  while (!Serial.available()) {
    yield();
  }
  SPIX.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE0));

  pinMode(CS_PIN, OUTPUT);
  digitalWrite(CS_PIN, HIGH);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);
  Serial.print("paused setup");
  while(Serial.read() == -1){}
  while(Serial.read() != -1) {}

}

void loop() {
  digitalWrite(CS_PIN, LOW);
  digitalWrite(LED_BUILTIN, HIGH);
  for(uint8_t i = 'a'; i <='f'; i++) SPIX.transfer(i);
  digitalWrite(LED_BUILTIN, LOW);
  digitalWrite(CS_PIN, HIGH);
  delay(50);
  //Serial.print("paused");
  //while(Serial.read() == -1){}
  //while(Serial.read() != -1) {}

}
@mjs513
Copy link
Author

mjs513 commented Feb 4, 2025

I ran same sketch under Mbed and saw same Max Freq of 8mhz. Think you all need to updated the datasheet.

Image

@facchinm facchinm added bug Something isn't working documentation Improvements or additions to documentation labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants