Made several changes to the Motor Shield when I found the terrible design of the official Arduino Motor Shield, which even does not have a official project example.
Here are the changes: according to the sch.pdf
1.Remove the chip IC2, which is CD4077D in the schematic.
2.Connect pin_2 and pin_3, which is called BRAKER-A in the schematic.
3.Connect pin_11 and pin_13, which is called BRAKER-B in the schematic.
4.Re-connect the PWMA to PIN10 of Arduino Board. on the back of the board.
cut the existing line (PWMA with pin3) using a knife.
re-connect to pin10.
It is OK if you dont want to do this step.
Then, the PIN label can be changed as :
I am using IN1,IN2,IN3,IN4, ENA, and ENB which are the original names of the chip L298N.
Finally, if you want to drive a step-motor, the official arduino example can be used with two little changes.
Firstly, create a stepper with new pin IDs (12,9,13,8).
then put the ENA and ENB at HIGH status in the setup() function.