77 * @brief Capture logic level changes on a single channel.
88 *
99 * @description
10+ * This routine will log timer values for the changes occurred in a pin defined
11+ * by the configuration byte.
12+ *
13+ * If a trigger is enabled, this will use an external interrupt service routine
14+ * attached to a pin defined by the trigger byte. Once the logic level is observed
15+ * to be the same as in EDGE bit, IC1 and IC2 modules will start the combined
16+ * timer (32-bits) and pass them to BUFFER using first two DMA channels.
17+ *
18+ * If no trigger is set, the timers will be started right away once the function
19+ * is called and logic level changes will logged referring to IC1 and IC2 capture
20+ * timers in BUFFER using the same DMA channels.
21+ *
1022 * This command function takes three arguments over serial:
1123 * 1. (uint16) number of data points to capture
1224 * 2. (uint8) trigger conditions:
1325 * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
14- * | PIN | X | X | EDGE | EN |
26+ * | TRIGGER PIN | X | X | EDGE | EN |
1527 * PIN: Digital pin from map:
1628 * 0: LA1,
1729 * 1: LA2,
2234 * 6: FREQ
2335 * EDGE: Falling (1) or Rising (0) edge trigger
2436 * EN: Enable trigger
25- * 3. (uint8) Configuration byte :
26- * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
27- * | CHANNEL | MODE |
37+ * 3. (uint8) channel and mode configurations :
38+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
39+ * | DIGITAL PIN | TRANSITIONS |
2840 * CHANNEL: Digital pin from the same map as above `PIN` maps
2941 * MODE: Logic transitions to capture. Refer `IC_PARAMS_CAPTURE_MODE`
3042 *
@@ -41,10 +53,29 @@ response_t LOGICANALYZER_OneChannel(void);
4153 * @brief Capture logic level changes in one channel
4254 *
4355 * @description
56+ * This routine is much similar to `LOGICANALYZER_OneChannel` except the trigger
57+ * is handled differently. If trigger is enabled, IC4 pin will be connected to a
58+ * pin defined by the trigger byte and an ISR will be activated for IC4 module.
59+ * This will trigger an interrupt when a logic change defined by the trigger byte
60+ * is observed at the pin attached to IC4. At the same time, IC1 and IC2 start
61+ * their timers and log timer values to BUFFER using DMA0 and DMA1 channels
62+ *
4463 * This command function takes three arguments over serial:
45- * 1. (uint16) Number of data points/change events to capture
46- * 2. (uint8) Trigger settings
47- * 3. (uint8) Channel and mode configurations
64+ * 1. (uint16) number of data points to capture
65+ * 2. (uint8) trigger conditions:
66+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
67+ * | TRIG PIN | X | TRIG MODE |
68+ * PIN: Digital pin from map:
69+ * 0: LA1,
70+ * 1: LA2,
71+ * 2: LA3,
72+ * 3: LA4,
73+ * 4: COMP4,
74+ * 5: SPI_CS,
75+ * 6: FREQ
76+ * 3. (uint8) channel and mode configuration:
77+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
78+ * | DIGITAL PIN | TRANSITIONS |
4879 *
4980 * It returns nothing over serial.
5081 * It sends an acknowledge byte (SUCCESS).
@@ -57,10 +88,37 @@ response_t LOGICANALYZER_OneChannelAlt(void);
5788 * @brief Capture logic level changes in two channels
5889 *
5990 * @description
60- * This command function takes three arguments over serial:
61- * 1. (uint16) Number of data points/change events to capture
62- * 2. (uint8) Trigger settings
63- * 3. (uint8) Channel and mode configurations
91+ * This routine will log timer values on logic level changes in two different
92+ * pins defined by the channel byte.
93+ *
94+ * If a trigger is enabled, this will use an external interrupt service routine
95+ * attached to a pin defined by trigger byte. Once the logic level is observed
96+ * to be the same as in EDGE bit, All IC modules will start the combined
97+ * timers (32-bits) and pass them to BUFFER using all four DMA channels.
98+ *
99+ * If no trigger is enabled, the timers will be started right away once the
100+ * function is called and logic level changes will logged referring to IC1 and
101+ * IC3 combined capture timers in BUFFER using the same DMA channels.
102+ *
103+ * This command function takes four arguments over serial:
104+ * 1. (uint16) number of data points to capture
105+ * 2. (uint8) trigger conditions:
106+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
107+ * | TRIG PIN | X | X | EDGE | EN |
108+ * PIN: Digital pin from map:
109+ * 0: LA1,
110+ * 1: LA2,
111+ * 2: LA3,
112+ * 3: LA4,
113+ * 4: COMP4,
114+ * 5: SPI_CS,
115+ * 6: FREQ
116+ * 3. (uint8) mode configurations:
117+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
118+ * | PIN 2 MODES | PIN 1 MODES |
119+ * 4. (uint8) channel configurations:
120+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
121+ * | PIN 2 CHANNEL | PIN 1 CHANNEL |
64122 *
65123 * It returns nothing over serial.
66124 * It sends an acknowledge byte (SUCCESS).
@@ -73,10 +131,36 @@ response_t LOGICANALYZER_TwoChannel(void);
73131 * @brief Capture logic level changes in three channels
74132 *
75133 * @description
134+ * This routine will log timer values on logic level changes in LA1, LA2 and LA3
135+ * pins. These pins are fixed for this mode of operation.
136+ *
137+ * If a trigger is enabled, this will use IC4 module as a trigger source to start
138+ * IC1, 2 and 3 timers. Once the logic level change as defined in trigger byte is
139+ * observed at IC4, it will generate an interrupt that will turn on all IC1,2,3
140+ * timers which will capture logic level changes defined in configuration integer.
141+ * IC modules will have 16-bit timers and the value is logged to BUFFER using
142+ * three DMA channels.
143+ *
144+ * If no trigger is enabled, the timers will be started right away once the
145+ * function is called and logic level changes will logged referring to IC1, 2
146+ * and IC3 combined capture timers in BUFFER using the same DMA channels.
147+ *
76148 * This command function takes three arguments over serial:
77- * 1. (uint16) Number of data points/change events to capture
78- * 2. (uint8) Trigger settings
79- * 3. (uint8) Channel and mode configurations
149+ * 1. (uint16) number of data points to capture
150+ * 2. (uint16) configurations:
151+ * | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
152+ * | X | X | X | X | LA3 EDGES | LA2 EDGES | LA1 EDGES |
153+ * 3. (uint8) trigger conditions:
154+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
155+ * | TRIG PIN | X | TRIG MODE |
156+ * PIN: Trig pin from map:
157+ * 0: LA1,
158+ * 1: LA2,
159+ * 2: LA3,
160+ * 3: LA4,
161+ * 4: COMP4,
162+ * 5: SPI_CS,
163+ * 6: FREQ
80164 *
81165 * It returns nothing over serial.
82166 * It sends an acknowledge byte (SUCCESS).
@@ -89,10 +173,29 @@ response_t LOGICANALYZER_ThreeChannel(void);
89173 * @brief Capture logic level changes in four channels
90174 *
91175 * @description
92- * This command function takes three arguments over serial:
93- * 1. (uint16) Number of data points/change events to capture
94- * 2. (uint8) Trigger settings
95- * 3. (uint8) Channel and mode configurations
176+ * This routine will log timer values on logic level changes in LA1, LA2, LA3
177+ * and LA4 pins. These pins are fixed for this mode of operation.
178+ *
179+ * If a trigger is enabled, this will use CN (Change Notifier) Interrupt Service
180+ * Routine to trigger the IC timers to log logic level changes. If any of the 4
181+ * pins observe a logic change as defined in trigger byte, the timers will get
182+ * started logging logic level changes in all 4 pins defined in the configuration
183+ * integer. IC modules will have 16-bit timers and the value is logged to BUFFER
184+ * using all four DMA channels.
185+ *
186+ * If no trigger is enabled, the timers will be started right away once the
187+ * function is called and logic level changes will logged referring to IC1, IC2,
188+ * IC3 and IC4 capture timers in BUFFER using the same DMA channels.
189+ *
190+ * This command function takes four arguments over serial:
191+ * 1. (uint16) number of data points to capture
192+ * 2. (uint16) mode configurations:
193+ * | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
194+ * | LA4 EDGES | LA3 EDGES | LA2 EDGES | LA1 EDGES |
195+ * 3. (uint8) pre-scaler settings for timer 2
196+ * 4. (uint8) trigger settings:
197+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
198+ * | X | X | LA4 | LA3 | LA2 | LA1 | EDGE | EN |
96199 *
97200 * It returns nothing over serial.
98201 * It sends an acknowledge byte (SUCCESS).
@@ -106,7 +209,7 @@ response_t LOGICANALYZER_FourChannel(void);
106209 *
107210 * @description
108211 * This command function does not take any arguments over serial. It will stop
109- * all the capture modules.
212+ * all the input capture modules.
110213 *
111214 * It returns nothing over serial.
112215 * It sends an acknowledge byte (SUCCESS).
0 commit comments