FATFS and RTOS not working together -> ecxeption handler

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Robotias
Level 1
Level 1
First question asked First like given Welcome!

Hi everyone,

I'm using a XMC4700 / XMC 4800 Relax Kit Series-V1.

I've got the "FATFS Example for XMC47" from here (https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html) running without any problems in debug mode.

But I also have to use RTOS.  So I open the FATFS_0.ui (FATFS_EXAMPLE_XMC47/DAVE/MODEL/APPS/FATFS/v4_0_14/Uimodel/FATFS_0.ui) and there I tick the box "Use RTOS".

Then in the DAVE CE perspective I click "Generate Code" and then "Debug".

This gives me several Error messages but uncommenting lines 72 to 82 in the file FATFS_EXAMPLE_XMC47/Dave/Generated/CMSIS_RTOS_RTX/INC/CMSIS_os.h will somehow solve these problems. (I found this solution here: https://community.infineon.com/t5/DAVE/Enabling-RTOS-in-DAVE-examples-breaks-them/td-p/309073)

After this I am able to start a debugging session. But the code does not run properly, it gets stuck somehow and when I press "pause" the FATFS_EXAPMLE_XMC47/Startup/startup_XMC4700.S file opens up marked at line 314. This is where the exception handlers are defined.

Using breakpoints, I found that line 136 in FATFS_EXAPMLE_XMC47/main.c is the last line in the main file that gets executed.

Debugger Console says:

```Program received signal SIGTRAP, Trace/breakpoint trap.
VADC0_G3_3_IRQHandler () at ../Startup/startup_XMC4700.S:314
314 b .```

I append a screenshot with most of the referenced information visible.

I would be happy to receive any help, thanks.

Please let me know if you need further information to help me solve this problem.

 

 

0 Likes
2 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

VADC0_G3_3_IRQHandler () error as we have seen is not actually the real cause of the issue. You can enable other fault handlers( HardFault_Handler, MemManage_Handler, BusFault_Handler, UsageFault_Handler ) in the code and track what exactly is the fault. 

Best Regards,
Vasanth

0 Likes
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @Robotias,

The thread was locked due to inactivity for a long time. You can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

Thanks and Regards,
Nikhil

0 Likes