2023-12-02 10:22 AM
Hello everybody,
I designed a touch sensor whith the STM32F042 MCU but after a week of constant testing and experimenting still not working. First the problem was that the TSC always get in the too much count error, after I thought that maybe the capacitance of the sensor is too low, so I directly soldered a 33pF capacitor on the sensor. Now it's count value is around 230 but going to hard fault error in the Hal library bytheway the TSC registers have correct values.
The sensor itself is far from the ideal on the PCB, it's very close to the MCU and small, but I think it should work, for me it doesn't make sense what I experienced.
I tried all the settings and now I don't know what to try next, please help me whith any suggestions, or anybody who experienced something like this, can tell me the what was the solution?
Solved! Go to Solution.
2023-12-02 01:42 PM
A hard fault typically indicates a program bug and not a hardware problem. The solution is to typically debug your program systematically until you find and fix the issue. For a hard fault, example why and where the hard fault occurred. STM32CubeIDE has a hard fault analyzer that you can use.
If you are stuck, I would load a known working example for your chip or board that shows how to use the TSC. Here is one:
2023-12-02 01:42 PM
A hard fault typically indicates a program bug and not a hardware problem. The solution is to typically debug your program systematically until you find and fix the issue. For a hard fault, example why and where the hard fault occurred. STM32CubeIDE has a hard fault analyzer that you can use.
If you are stuck, I would load a known working example for your chip or board that shows how to use the TSC. Here is one:
2023-12-11 01:31 PM
Thank You, the problem was like trivial, when the group adress needed I was give the IO adress.