Coder Social home page Coder Social logo

triodegirl / arduino-uno-r4-wake_from_interrupt-and-system-clock-switching Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

Arduino UNO R4 test-code to demonstrate: 1. Wake-From-Interrupt 2. Change System-Clock divisors 1/1, 1/16, and 1/64 settings 3. Switching between 48MHz HOCO and 8MHz MOCO internal oscillators (and PLL with XTAL if fitted) 4. USB Module Disable (with code initiated Reset after timeout delay)

C++ 100.00%
arduino ra4m1 uno-r4 clock-divisor clock-switching usb-disable wake-from-interrupt

arduino-uno-r4-wake_from_interrupt-and-system-clock-switching's Introduction

Arduino UNO R4 test-code to demonstrate:

  1. Wake-From-Interrupt
  2. Change System-Clock divisors 1/1, 1/16, and 1/64 settings
  3. Switching between 48MHz HOCO and 8MHz MOCO internal oscillators (and PLL with XTAL if fitted)
  4. USB Module Disable (with code initiated Reset after timeout delay)

Unlike a linear regulator which adds to the current, the onboard ISL854102FRZ DC/DC converter trades Volts for Current and therefor the readings when powered from an external 9.0V supply to Vin show a lower power-consumption than would be measured on the +5V rail input itself (I don't have a USB DVM module).

Standard R4 Minima - LED series resistors all 330 ohm

Board running with +9.0V VIN at 48 MHz HOCO clock with default IDE settings:

  1. Without sleep, USB active = c. 21.5 mA
  2. With WFI and USB active = c. 13.3 mA
  3. With WFI but USB disabled = c. 11.2 mA

To properly get low-power operation some board mods are needed, as supplied the ON LED takes 8 to 9 mA from the +5V rail just by itself! It is likely that low-power modes are mostly of interest for stand-alone setups which are not connected to a host USB - but turning off the internal USB 3v3 regulator also removes the +3v3 from the board's Power-Header's pin.

Board changes for Low_Power

  1. ON LED series resistor changed to 2.7K, and LED VCC connection changed to VUSB.
  2. L LED series resistor changed to 1.7K (which = 1.8mA if 100% on).

Board running with +9.0V VIN at 48 MHz HOCO clock with default IDE settings:

  1. Without sleep, USB active = c. 15.5 mA
  2. With WFI and USB active = c. 7.5 mA
  3. With WFI but USB disabled = c. 5.3 mA

Board running with +9.0V VIN at 8 MHz MOCO clock with default IDE settings:

  1. Without sleep, USB active = c. 6.2 mA - HOCO still running for USBFS Module
  2. With WFI and USB active = c. 4.1 mA
  3. With WFI but USB disabled = c. 2.8 mA - HOCO stopped

Further measurments with 1/16 and 1/64 clock divisors in C code file.

231216-susan-minima-board-mods-1

I have also added an external 12MHz XTAL.

arduino-uno-r4-wake_from_interrupt-and-system-clock-switching's People

Contributors

triodegirl avatar

Watchers

 avatar

arduino-uno-r4-wake_from_interrupt-and-system-clock-switching's Issues

Deep Software Standby mode possible for an Arduino UNO R4 Minima board?

Hi Susan,

Thanks for your Arduino UNO R4 example code. It is really helpful to get familiar with the Arduino Renesas RA4M1 core.

Questions:

a) Is there a way to enter the 'Deep Software Standby mode' of an Arduino UNO R4 Minima ?
b) if yes, which supply currents can be achieved in 'Deep Software Standby mode' ?
c) Is it possible to further reduce the supply currents, e.g. by de-soldering the LEDs?

I am wondering an Arduino UNO R4 Minima could be used as a sensor node with a battery supply. I am used to do this for ATMega284P boards. This requires supply currents of <10 uA in deep sleep mode.

Thanks in advance.

Best regards,

Ewald

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.