I'm trying to program an Arduino Nano 33 BLE bare-metal to get some precise timing and size measurements. I've managed to upload the code to my card, but I cannot communicate with it. More specifically, when I upload the code, the port 'deactivates' after I upload the code, so the serial monitor prints a cannot exec '/dev/ttyACM0' error.

Can someone help me figure out how to make it work? I've seen tutorials online but they're for AVR microcontrollers, and I've been told that this specific board isn't. I've also been told that I must include some code in my c/cpp file to produce a USB CDC serial port, but I don't know how to do that.

  • upload a simple example from the IDE Examples menu Communication section
    – Juraj
    Commented Jun 6, 2023 at 9:23
  • What are you measuring that you can't do it with freeRTOS/mbed-os? You can always use timer(s), events and tasks + shortcuts (or generic connection) and DMA
    – KIIV
    Commented Jun 6, 2023 at 11:34
  • Well, it seems that mbedOS is messing up with my timing experiments, the measurements fluctuate when they shouldn't. Plus, even an empty sketch uses a lot of memory, and I wish to be able to compare the memory consumption of multiple programs. I guess I could always subtract the cost of an empty sketch, but that doesn't seem very practical to do that by hand. Commented Jun 6, 2023 at 12:55
  • I'm not sure, but I think rtos usually has some memory stats os.mbed.com/docs/mbed-os/v6.16/apis/… about timing, you can use high prio task (+ delays to allow lower priority tasks to do run)
    – KIIV
    Commented Jun 6, 2023 at 14:00
  • Have you seen any of these Q+As? arduino.stackexchange.com/search?q=%2Fdev%2FttyACM0
    – VE7JRO
    Commented Jun 6, 2023 at 17:30

1 Answer 1


The Nano 33 BLE board uses a NORDIC nRF52840 processor which contains the USB interface hardware inside the processor. The current Arduino Uno uses an Atmel (now owned by Microchip) processor and uses an external processor for USB communications. So any Arduino USB tutorial will be very different with respect to these two Arduino designs.

Normally, Arduino Sketches (Programs) are only part of all the software running on a processor. The preprogrammed software on a new Arduino board abstracts the more complex part of embedded programming from the average Arduino user. This likely includes a working USB port.

To do bare metal programming on a NORDIC nRF52840 processor, consider starting with the NORDIC Software Development Kit (SDK). Also, most vendors support their own development boards (provide example programs and libraries) better then development boards made else where. Consider this before committing to learning how to bring up a "bear metal" USB/CDC peripheral device using the Nano 33 BLE board.

An alternative approach: Many ports of Arduino occur on github.com. The adaptation of the Arduino code may offer insights as to how the host processor's hardware works. The Nano 33 BLE preprogrammed software comes from this github repository.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.