Saturday 28 March 2009

use of the functional blocks

I started my cortex journey in experimenting step by step all the great features this target provides. The best way of writing this down is by giving you an overview of them. So her we go than;
  1. Timer1 to generate a fixed interrupt every 25µs and start an ADC conversion
  2. Timer2 with a period of 10ms
  3. Timer2 CC1/2 interrupt for triac1 pulse
  4. Timer2 CC3/4 interrupt for triac2 pulse
  5. Timer3 with a period of 10ms
  6. Timer3 CC1/2 interrupt for triac3 pulse
  7. Timer3 CC3/4 interrupt for triac4 pulse
  8. Timer4 with a period of 10ms
  9. Timer4 CC1/2 interrupt for triac5 pulse
  10. Timer4 CC3/4 interrupt for triac6 pulse
  11. ADC end of conversion interrupt
  12. Systick every 1ms to generate delay
  13. EXTI0 to capture a button1 state change
  14. EXTI1 to capture a button2 state change
  15. EXTI2 to capture a button3 state change
  16. EXTI3 to capture a button4 state change
  17. EXTI4 to capture a button5 state change
  18. EXTI5 to capture a button6 state change
  19. WWDG watchdog interrupt every 58ms
  20. I2C1/2 event interrupts
As you can see quit a list ! This baby must handle 15 different interrupts which is a lot. But my tests didn't show any major problems. I had just a bit of priority tuning to do. Of course I did a couple of weeks to get trough al this as you could guess. But it went very smoothly I must say. Especially using the ride firmware library was highly speeding up all this. In my next blog I will go into details of every topic.

Sunday 8 March 2009

brand new target

Because of the calculation and speed limits of the AVR I had to change my target for the trios project. The reason why I had to do this is explained in the trios blog. I have chosen the ARM CORTEX STM32 target as a replacement. After lots of web searches I discovered a nice development board from the olimex site: http://www.olimex.com . On the picture you can see the board already adapted on the prototype area.I took the STM32-P103 header providing also a the prototype area which I needed to prepare some extra input signals. Its available for ca 80€ which is a great price for what you get ! I copied the list of all the features here:
  • MCU: STM32F103RBT6 ARM 32 bit CORTEX M3™ with 128K Bytes Program Flash, 20K Bytes RAM, USB, CAN, x2 I2C, x2 ADC 12 bit, x3 UART, x2 SPI, x3 TIMERS, up to 72Mhz operation
  • standard JTAG connector with ARM 2x10 pin layout for programming/debugging with ARM-JTAG
  • USB connector
  • CAN driver and connector
  • RS232 driver and connector
  • UEXT connector which allow different modules to be connected (as MOD-MP3, MOD-NRF24LR, etc)
  • SD-MMC connector
  • backup battery connector
  • RESET button
  • status LED
  • power supply LED
  • on board voltage regulator 3.3V with up to 800mA current
    single power supply: takes power from USB port or power supply jack
  • 8 Mhz crystal oscillator
  • 32768 Hz crystal and RTC backup battery connector
  • extension headers for all uC ports
  • PCB: FR-4, 1.5 mm (0,062"), soldermask, silkscreen component print
  • Dimensions: 100 x 90mm (3.94 x 3.5")

I also bought the JTAG debug Rlink from Raisonance see picture. It connects the target very easy using USB to a host PC where you can debug the target straight from within the Ride 7 Raisonance IDE. This IDE is free for download. The libraries provided for the ST target are great to work with. So join me again on the road to the final project we are almost there. Next blog will cover some of the processor in depth features like interrupts and timers that I will use.