cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 Matrix Keypad is causing CPU Halt

selaslan2
Associate
Posted on November 02, 2015 at 14:51

Hi

I'm using STM32F103 in our products. We have sold about 700 unit before.

Now We are in second mass production.

But we have faced with a problem that has been reported by the clients.

Our device features are:

- RFID based door access controller

- 4x4 membrane matrix kaypad

- 10/100 Ethernet interface with a co-ethernet cpu (Wiznet W5200)

- 3.3V and 5V supply available on board

- 2x16 digits character LCD

- RS-232 and RS485 interface

- 2 Relays

The problem is ;

When a user try to use keypad, the device is stopping to run.

In this case,

- Keypad is not working

- Blink LEDs are stopping

- TCPIP is off

The periode of this failure is different from device to device. 1 hour, 1 day or 2 days.

We have tested here. We saw this problem in our R&D

I have added serial resistor (470R) to matrix keypad outputs.

And We used 100nF capacitor (to ground) in the keypad inputs.

The problem is solved mostly. But after 1 week, We saw the failure again.

What can we make more to solve this failure completely

Selahattin Aslan

3 REPLIES 3
Posted on November 02, 2015 at 14:58

So are you getting a Hard Fault? Does your fault handler sit in  while(1) loop or do you output some useful information about the fault?

Are outputting any diagnostic information during operation so you can isolate exactly what's going on?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
selaslan2
Associate
Posted on November 02, 2015 at 15:29

I have written  NVIC_SystemReset() function instead of endless loop.

But We could not see any software reset in this failure situation.

Because If It trigger software reset, we would see the initial LED and buzzer actions.

In addition, We could not continue to debugging during the failure, The ST Link V2 is disconnection from the CPU by outputting USB communication error.

SO We could not obtain any information about the fault registers. 

I have isolated all the function (LCD, Ethernet, com ports and all) except keypad.

But We saw the problem again.

To locate 100nF to each keypad inputs reduced the failure periode.

When we unplug the membrane keypad, the device is working properly with all functions.

We have tried some different keypads. All are same.

In fact, we sold many device with this keypad.

  

Posted on November 02, 2015 at 19:24

In addition, We could not continue to debugging during the failure, The ST Link V2 is disconnection from the CPU by outputting USB communication error. SO We could not obtain any information about the fault registers.

Which is why a serial port would be a more effective, and less invasive, way of getting diagnostic and telemetry data out.

Is your code getting into infinite loops anywhere? Do your have a watch dog timer?

Why would an issue with the keyboard stop other LEDs blinking? Do the LEDs get toggled in interrupt code, or in a main loop structure?

Do you have some ESD, or latch-up, issue?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..