Arduino Mega 2560 Stop Read IMU every PWM Pin Connected to Motor Driver

Hi, i have strange Error on my Arduino Board. I have Arduino Mega 2560 R3, i use the board to read IMU sensor and move the motor based on IMU position. I connect PWM pin from Arduino Mega 2560 to L6234D motor driver.

The problem is, every time i connect any PWM Pin, the it will stop read IMU. If i not connect the PWM pin, it will running well.

Whats wrong with my Board? Previously, I have tested my code with my old Arduino Mega 2560, and it's works well. Then, my board is broken, and i replace it with my new Arduino Board, And this problem appear.

Can anybody help me?

UPDATE: Sometimes it will works normal, but sometimes it will error again.

AND THIS IS VERY STRANGE:
When my program running (i watch it on serial monitor), then i touch the heatsink part of my motor driver circuit, it will stop running. I do this many times to make sure, and it's always happen.

What happen? I'm very frustration..