2025-06-03 4:48 AM
I'm working on a project that needs both TouchGFX GUI and CAN communication. After configuring my STM32F429 with TouchGFX, I'm unable to enable CAN1 in STM32CubeMX.
From what I understand, CAN2 is a slave/dependent peripheral that requires CAN1 to be active, so I need CAN1 functioning first. If I create a can task with CAN2 it does not work (Loopback mode), and if I enable CAN1 the display will stop working.
Is there a recommended pin configuration that allows both TouchGFX and CAN to coexist?
Has anyone successfully implemented both TouchGFX and CAN on the F429?
Thanks!
Solved! Go to Solution.
2025-06-03 6:27 AM
CAN1 is not available with TouchGFX. As you said, all the available CAN1 pins are either used by LTDC or FMC:
Meanwhile CAN2 is available. You can use it on PB12/PB13.
If CAN2 is not working, please open a new thread. That doesn't have a relation with TouchGFX function.
I suggest to run CAN2 separately without TouchGFX to simplify the analysis.
Thank you
2025-06-03 4:53 AM
Hello @Mike11 and welcome to the community,
You need first to ensure that there is no overlap in the GPIOs usage with LCD and touchscreen functionality with CAN IOs. This is the first step you need to check.
If there is an overlap you need to use other IOs for CAN.
2025-06-03 5:15 AM
Hello @mƎALLEm thanks for the answer.
The issue for is that all the pins for CAN1 are used by LTDC and FMC
From what I see the possible pins for CAN1 are PB8 PD0 and PA11 for CAN1_RD and PB9 PD1 and PA12 for CAN1_TD. PB8 PB9, PA11 PA12 are used by LTDC, and PD0 and PD1 are used by FMC ( SDRAM1 Data).
2025-06-03 5:58 AM
You didn't tell what board are you using?
You didn't share your ioc file
Meanwhile, if all the alternate functions available for CANx are used by the LTDC and FMC, unfortunately for you, it will not possible to use both TouchGFX and CAN at the same time.
2025-06-03 6:09 AM
I am using STM32F429I-DISC1. As for the .ioc I am reffering to any TouchGFX generated project(just a background added from TouchGFX). I will add it in this reply. Is there no alternative for SDRAM1 for using Touch GFX?
2025-06-03 6:09 AM
2025-06-03 6:27 AM
CAN1 is not available with TouchGFX. As you said, all the available CAN1 pins are either used by LTDC or FMC:
Meanwhile CAN2 is available. You can use it on PB12/PB13.
If CAN2 is not working, please open a new thread. That doesn't have a relation with TouchGFX function.
I suggest to run CAN2 separately without TouchGFX to simplify the analysis.
Thank you