Good first training practice : Have your LEDs flashing
Step 1 : Create a function : Word My_Function ( void )
Nothing really hard so far !
Step 2 : Create the LED driving JTAG bus
A minimum of 2 buses are needed :
- One output bus ( to drive a logic level on the physical pin )
- One control bus ( to validate the output JTAG cell )
- One optional input bus to monitor the drive pin (verify the output data)
What is called "bus" is a set of JTAG cells. In this textbook case the bus will be formed with only one cell.
In the first line à a bus named "mon_bus_out" is created.
Parameters are a caracter string with the real name ( user free ) and a reference to the board (default is "&board" ).
Next thing to do is to initialise the bus and attach him the proper JTAG cells. This initialisation is done by "BusInit".
The first parameter is the number of triplets "LABEL_PORT, CELLULE MSB, CELLULE LSB".
The second parameter is the JTAG cell(s) included in the bus ( here , a reference on io_out port of mn43 component, with cell number 30 ).
The same thing is to be done with the control cell :
And now, I can use the new buses.
Step 3 : Make the led blinking
The component must be first put in Extest mode, but be aware that others JTAG cells are in disable mode !
Last step is to activate blinking :
If you can do that : You can do every thing that is possible with JTAG ... Now it's your turn .