Does the Primer2 User manual have the information you need? The mapping of the extension connector is on page 8:
http://www.stm32circle.com/resources/do … Manual.pdf
For example Pin 16 on the extension connector is connected to pin PA.2 (GPIO Port A, Bit 2) and is also the TX line for USART2 (depending on how you configure the GPIO ports).
Basically the GPIO lines on the STM32F103VET6 are organized as "ports" GPIOA ... GPIOE, each having 16 bits (Bit 0 ... Bit 15).
Schematic: http://www.stm32circle.com/resources/do … r2_1_2.PDF
If you look at the "toggle" example that comes with Ride 7 (should be in C:\Program Files\Raisonance\Ride\Examples\ARM\Primer\Primer2\toggle), you can see how the built-in LEDs are flashed.
At the top is the definition section for the built-in LEDs (which are on GPIO Port E, Bits 0 and 1):
So let's say you want to use pins 16 and 18 on the Extension connector (i.e PA.2 and PA.3), you should be able to change the above code from GPIOE to GPIOA and the Bits 2 and 3:
Note: I didn't try this right now since my Primer is in use for something else, but you probably get the idea.
Hope that helps,
Mike
Last edited by mikepo (2011-03-09 04:41:16)