Teensy 4.1 Resetting when running FreeRtos/Linux issue?

Bodger62

Member
Hello All,

My problem is that the attached code, compiled on my Linux computer, used to work but now causes the Teensy 4.1 to constantly reset.

Teansy 4.1 core = 411FC271
Power-up Sequence
Teansy 4.1 core = 411FC271
CPU Lockup or Software Reset

I am relatively certain that the problem is with my laptop, as the code works on another colleague's computer without resetting, but I’ve no idea how to fix it.

I have attached the code, but not the FreeRros as it was too big, and the Arduino start-up statements.

Any help would be greatly received.

regards,

Ray

I couldn't attach the FreeRtos.zip as it was too large. The properties of the version I'm using are as shown below

name=FreeRTOS
version=10.4.3-8
author=Richard Barry <info@freertos.org>
maintainer=Phillip Stevens <phillip.stevens@gmail.com>
sentence=<h3>FreeRTOS Real Time Operating System implemented for AVR (Uno, Nano, Leonardo, Mega).</h3>
paragraph=The primary design goals are: Easy to use, Small footprint, Robust. Uses Watchdog Timer for 15ms resolution. Slow blink = stack overflow. Fast blink = heap malloc() failure.
category=Timing
url=https://github.com/feilipu/Arduino_FreeRTOS_Library
architectures=*
license=MIT
includes=Arduino_FreeRTOS.h

======================= It didn't like the .odt file either =======================

aygray@MORCHEBA:~$ uname --kernel-name --kernel-release --machine



Linux 5.4.0-195-generic x86_64



raygray@MORCHEBA:~$ cat /etc/os-release



NAME="Ubuntu"

VERSION="20.04.6 LTS (Focal Fossa)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 20.04.6 LTS"

VERSION_ID="20.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

VERSION_CODENAME=focal

UBUNTU_CODENAME=focal
 

Attachments

  • test.txt
    45.9 KB · Views: 16
  • Pretend_GPU.ino
    6.4 KB · Views: 17
After a bit more research I have found the following

CrashReport:
A problem occurred at (system time) 14:43:47
Code was executing from address 0xEB000426
CFSR: 92
(DACCVIOL) Data Access Violation
(MMARVALID) Accessed Address: 0x3530
HTSR: 40000000
(FORCED) Forced Hard Fault
Temperature inside the chip was 41.15 °C
Startup CPU clock speed is 600MHz
Reboot was caused by auto reboot after fault or bad interrupt detected


Booting FreeRTOS kernel V10.3.1. Built by gcc 11.3.1 20220712 (newlib @NEWLIB_VERSION@) on Sep 18 2024. ***

raygray@MORCHEBA:~/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin$ ./arm-none-eabi-addr2line -e Pretend_GPU.ino.elf 0x3530
/home/raygray/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/pwm.c:336

However, pwm.c isn't used in this project.

oid quadtimer_init(IMXRT_TMR_t *p)
{
int i;

for (i=0; i < 4; i++) {
p->CH.CTRL = 0; // stop timer
p->CH.CNTR = 0;
p->CH.SCTRL = TMR_SCTRL_OEN | TMR_SCTRL_OPS | TMR_SCTRL_VAL | TMR_SCTRL_FORCE;
p->CH.CSCTRL = TMR_CSCTRL_CL1(1) | TMR_CSCTRL_ALT_LOAD;
// COMP must be less than LOAD - otherwise output is always low
L336 p->CH.LOAD = 24000; // low time (65537 - x) -
p->CH.COMP1 = 0; // high time (0 = always low, max = LOAD-1)
p->CH.CMPLD1 = 0;
p->CH.CTRL = TMR_CTRL_CM(1) | TMR_CTRL_PCS(8) |
TMR_CTRL_LENGTH | TMR_CTRL_OUTMODE(6);
}
}
 
0xEB000426 is not a valid address for code. It looks more like an opcode than a memory address.
 
Back
Top