source: test2.git/readme.txt@ b6aa0ba

Last change on this file since b6aa0ba was b6aa0ba, checked in by andib <andi.b@…>, 2 years ago

test with more files

  • Property mode set to 100644
File size: 3.3 KB
Line 
1Template EFM32JG1B, derived from previous EFM32 projects
220191213 Andreas Buchinger
3--------------------------------------------------------
4
5main.c, leds.c
6--------------
7RTC - set up to wake up core every ~1ms. Minimal scheduler for periodically
81ms, 10ms, 25ms... tasks. If all tasks are finished go to EM2.
9
10On STK3401A only 2 LEDs are mounted. Driven by GPIO [PF4] and PF5. PF4 is needed
11for Trace so only LED2 is used with STK3401A.
12[LED0 / PF4: Alive, switched on in main every second for 10ms]
13[LED1: Switched on during ADC conversion and during filtering (AdcFinishedIRQ)]
14LED2 / PF5: Shows when EFM is out of EM2 (EM1 JADE), switched on in every IRQ
15handler, switched off when entering EM2 (EM1 JADE)
16
17
18TraceLeUart.c, Commands.c
19-------------------------
20PF3, PF4
21Minimal terminal functions via LEUART0 running in EM2 (before JADE). Debug
22message output. Routed to 10pin header pin 2/3 on Olimex board and at DEBUG
23connector on all own boards. 9600bps for older boards. Starting with JADE
24115200bps, 1 stop, no parity, no handshake. JADE/PEARL (JG1B) does have
25terrible jitter on LFRCO so debug out does not work relialbe with more than
262400bps. So switching LEUART clock to HFRCO and using 115200bps. Drawback -
27switching to EM2 is not possible when debug data are sent out. This may
28significantly increase energy consumption depending on debug data.
29
30Debug messages are defined by simple use of TRACE(), TRACE_L2() and TRACE_L3()
31macros. Message format in printf style. \r\n is automatically added with every
32TRACE message. Debug level from 0 to 3 is defined in trace.h for every single
33module. Level 0 means no logging at all and NO ADDITIONAL CODE. It is not
34necessary to clean up sources for release builds but only set log level to 0 in
35trace.h (or uncomment NO_TRACE) and there is no code overhead anymore.
36
37Trace messages are copied into a ring buffer and sent out in background via
38LEUART0 IRQ handler (even in EM2 before JADE). Buffer copying and sprintf used
39with TRACE uses only little time but do have small influence on execution speed.
40If too much logging info is requested as with 9600bps can be sent out, buffer
41fills up and overflow may occure. *** is inserted in output stream in such cases
42and trace info is lost. For Ring buffer size see LOG_TX_RING_BUF_SIZE in
43TraceLeUart.c.
44
45!!! ARM Cortex-M3 Hard Fault Handler !!!
46tries to write readable fault information to debug out and restart system
47
48
49Hardware.c
50----------
51Hardware dependant functions. Version/Revision, UID, DIP-Switches, ...
52
53
54Adc.c
55-----
56Starting with JADE ADC is configured to run in EM2 without any CPU
57intervention. LETIMER0 is used to trigger ADC via PRS and LDMA transfers
58results into adcBuffer. LETIMER0 runs at 1kHz. Every 1ms new ADC samples
59for all configured inputs (AdcInit) are transferd to the buffer.
60Based on github adc_scan_letimer_prs_dma sample
61
62
63
64Used Ressources:
65----------------
66main.c
67 RTC ... system clock, wakes up every ~1ms, running from LFRCO
68
69TraceLeUart.c
70 LEUART0 ... trace output with 115200bps routed at 10pin header
71
72Adc.c
73 LETIMER0... triggers ADC every 1ms
74
75 LDMA_CHANNEL 0
76 PRS_CHANNEL 0
77
78IRQs Priority Modul
79 RTC 7 main
80 LEUART0 7 TraceLeUart
81 GPIO_EVEN 7 TraceLeUart
82 LDMA 6 Adc
83
84Valid priority values are 0..7 where 7 is the lowest priority. Default 0.
85
86
87
88
Note: See TracBrowser for help on using the repository browser.