element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Nico teWinkel's Blog Arduino R4 WiFi Bug? BLE + LED Matrix
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ntewinkel
  • Date Created: 6 Aug 2023 10:09 PM Date Created
  • Views 1111 views
  • Likes 10 likes
  • Comments 2 comments
  • ble
  • led matrix
  • bug
  • Arduino R4 Wifi
Related
Recommended

Arduino R4 WiFi Bug? BLE + LED Matrix

ntewinkel
ntewinkel
6 Aug 2023

I think I just ran into an early-stage bug on the Arduino Uno R4 WiFi.

My previous 2 blog posts separately covered displaying frames on the LED Matrix and Receiving BLE commands.
Combining the 2 sketches, however, caused it to break.

When I first just combined the sketches by putting the lines into the matching places in a new sketch, essentially just merging the two, the BLE no longer advertised the characteristic for the direction.

Commenting out the LED Matrix code brought it back to life. Reinstating it line by line, the issue happens again as soon as I add the line:
ArduinoLEDMatrix matrix;

I thought I would try moving that declaration, and the matrix.begin() line into a function that only gets called later, and that worked to make the BLE behave again, but then as soon as that function is called, the system crashes and reports a "bus fault" in "DisplaySingleFrame.ino" (I'm assuming that's in the library), which it describes as follows:
"Bus fault is caused by precise data access violation"

So I think there's some memory issues in the Arduino code for either the LED Matrix or the BLE code.
I suspect the matrix code is stepping where it shouldn't be stepping.
If I comment out line by line again, the issue happens when loadFrame() is called.

So that's a little annoying. I might need to try a different approach (unless that problem gets fixed).

Edit: Definitely a bug.

Someone else reported a similar situation on the Arduino Forum.

I found a very easy repro-case:

  1. Start with the built-in example: ArduinoBLE - Peripheral - LED
  2. Add these 2 lines from the LED_Matrix - DisplaySingleFrame example:
#include "Arduino_LED_Matrix.h"
ArduinoLEDMatrix matrix;

If you then comment out the definition of matrix, the BLE example works properly again.
(I added those 2 lines just after the line that includes ArduinoBLE.h)

  • Sign in to reply
  • ntewinkel
    ntewinkel over 2 years ago

    As a next step I had planned to try WiFi instead, but it seems to also be having a lot of problems - mainly, the response time is terrible, at times hanging, when trying the built-in WiFi server examples that use a URL to turn an LED on and off.

    I think I will shelve this project for a little bit while the bugs are being worked out of the new R4 libraries.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 2 years ago

    Looks like the issue is with the BLE library, as using other random libraries causes the same issue:

    #include "analogWave.h"
    analogWave wave(DAC);
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube