Skip to content

Commit 74b91b3

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents 816118a + 2df96af commit 74b91b3

132 files changed

Lines changed: 16831 additions & 145 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Getting Started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Now that your setup is complete, you can start developing your projects with Sen
6060
* Check out sample projects in `projects\` folder, and respective [Projects]({% link Projects/index.md %}) section
6161
* For troubleshooting or guidance, visit the [Help]({% link Help/index.md %}) section
6262

63-
{: .note}
63+
{: .NOTE}
6464
If you are interested in contributing to SensEdu, visit the [Contributing]({% link Contributing/index.md %}) page and join our community!
6565

6666
[Arduino IDE]: https://support.arduino.cc/hc/en-us/articles/360019833020-Download-and-install-Arduino-IDE

docs/Library/ADC.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ An overview of possible errors for ADC:
2929
* `0x2002`: Passed ADC instance is not either `ADC1`, `ADC2` nor `ADC3`
3030
* `0x2003`: ADC failed to disable
3131
* `0x2004`: ADC failed to power up
32-
* `0x2005`: Selected pin for ADC is not reachable. Refer to the [table]({% link Library/ADC.md %}#notes) to find proper pins for each ADC instance
32+
* `0x2005`: Selected pin for ADC is not reachable. Refer to the [table] to find proper pins for each ADC instance
3333
* `0x2006`: Unexpected pin number during initialization. Must be at least 1
3434
* `0x2007`: Unexpected address or memory size for DMA
3535
* `0x2008`: Unexpected sampling frequency. Must be at least 1kHz
@@ -80,7 +80,7 @@ typedef struct {
8080
* `mem_address`: DMA buffer address in memory (first element of the array)
8181
* `mem_size`: DMA buffer size
8282

83-
#### Notes {#adc_table_id}
83+
#### Notes {#adc_mapping}
8484
{: .no_toc}
8585

8686
Be aware of which pins you can use with selected ADC. Table below shows ADC connections. For example, you can't access `ADC3` with pin `A7`, cause it is only connected to `ADC1`.
@@ -268,7 +268,7 @@ void SensEdu_ADC_ShortA4toA9(void);
268268
269269
#### Notes
270270
{: .no_toc}
271-
* **In older board revisions**, microphone #2 is wired to pin `A9` (`PC3_C`), which is routed only to `ADC3`. This conflicts with project requiring x4 microphones, using `ADC1` and `ADC2` with x2 channels per ADC. To solve this problem, `_C` pins could be shorted to their `non_C` counterparts. This way pin `A4` (`PC3`) is bridged to `A9` (`PC3_C`), allowing microphone #2 to be accessed via any ADC, since `PC3` is shared between `ADC1` and `ADC2`. Refer to the table at [settings section]({% link Library/ADC.md %}#notes) for better understanding.
271+
* **In older board revisions**, microphone #2 is wired to pin `A9` (`PC3_C`), which is routed only to `ADC3`. This conflicts with project requiring x4 microphones, using `ADC1` and `ADC2` with x2 channels per ADC. To solve this problem, `_C` pins could be shorted to their `non_C` counterparts. This way pin `A4` (`PC3`) is bridged to `A9` (`PC3_C`), allowing microphone #2 to be accessed via any ADC, since `PC3` is shared between `ADC1` and `ADC2`. Refer to the [table] at settings section for better understanding.
272272
273273
274274
## Examples
@@ -658,14 +658,14 @@ __attribute__((aligned(__SCB_DCACHE_LINE_SIZE))) uint16_t memory4adc[memory4adc_
658658

659659
### Reading ADC Data
660660

661-
The STM32H7 microcontroller is equipped with three ADC modules, each capable of accessing multiple channels (refer to the [table] above). Reading the ADC values from a single channel is straightforward, as the data is stored consecutively in an array.
661+
The STM32H7 microcontroller is equipped with three ADC modules, each capable of accessing multiple channels (refer to the ADC mapping [table] above). Reading the ADC values from a single channel is straightforward, as the data is stored consecutively in an array.
662662

663663
However, when reading data from multiple channels within a single ADC module, users must use different approach. The data for each channel is interleaved in the array, meaning that the data for each channel is stored one after the other, rather than all data from first channel followed by all data from second channel, and so forth. This structure is illustrated clearly in the following figure giving an example of using two channels with one ADC module.
664664

665665
<img src="{{site.baseurl}}/assets/images/ADC_Data_Flow.png" alt="drawing"/>
666666
{: .text-center}
667667

668-
[table]: /SensEdu/Library/ADC/#adc_table_id
668+
[table]: /SensEdu/Library/ADC/#adc_mapping
669669
[this issue]: https://github.com/ShiegeChan/SensEdu/issues/8
670670
[STM32H747 Reference Manual]: https://www.st.com/resource/en/reference_manual/rm0399-stm32h745755-and-stm32h747757-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
671671
[Manual Page]: https://www.st.com/resource/en/reference_manual/rm0399-stm32h745755-and-stm32h747757-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

docs/Projects/EMG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: EMG
3+
layout: default
4+
parent: Projects
5+
math: mathjax
6+
nav_order: 4
7+
---
8+
9+
# EMG
10+
{: .fs-8 .fw-500 .no_toc}
11+
---
12+
13+
Cool Description
14+
{: .fw-500}
15+
16+
- TOC
17+
{:toc}
18+
19+
## Introduction
20+
21+
SensEdu is equipped with x2 [AD8222] Instrumentation Amplifier ([datasheet]).
22+
23+
Each Amplifier is dual-channel, so we have 4 channels in total. All channels are accessible from the following Jumpers:
24+
* J9: 1st Channel of U5 -> outputs MIC5 - A0 - ADC12_INP4
25+
* J11: 2nd Channel of U5 -> outputs MIC6 - A2 - ADC12_INP9
26+
* J12: 1st Channel of U6 -> outputs MIC7 - A11 - ADC12_INP0
27+
* J20: 2nd Channel of U6 -> outputs MIC8 - A7 - ADC1_INP16
28+
29+
Refer to the [ADC mapping table](/SensEdu/Library/ADC/#adc_mapping) for better understanding.
30+
31+
Circuit for each of the amplifier:
32+
33+
<img src="{{site.baseurl}}/assets/images/amp_circuit.png" alt="drawing"/>
34+
{: .text-center}
35+
36+
## Test
37+
38+
WASD Dark Souls for 4 channels?
39+
40+
41+
42+
43+
[AD8222]: https://www.analog.com/en/products/ad8222.html?doc=ad8222-KGD.pdf
44+
[datasheet]: https://www.analog.com/media/en/technical-documentation/data-sheets/AD8222.pdf

docs/assets/images/amp_circuit.png

112 KB
Loading

libraries/SensEdu/examples/Basic_UltraSound/matlab/Basic_UltraSound_ReadData.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
data = zeros(1,ITERATIONS);
2121
time_axis = zeros(1,ITERATIONS);
2222

23-
tic;
2423
for it = 1:ITERATIONS
2524
% Data readings
2625
write(arduino, 't', "char"); % trigger arduino measurement
2726
time_axis(it) = toc;
28-
27+
tic
2928
data = read_data(arduino, DATA_LENGTH);
29+
toc
3030
plot_data(data);
3131
end
3232

Binary file not shown.
Binary file not shown.
Binary file not shown.

libraries/SensEdu/examples/Read_2ADC_3CH_DMA/Read_2ADC_3CH_DMA.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ uint8_t adc1_pins[adc1_pin_num] = {A0, A1, A2};
1212
uint8_t adc2_pins[adc2_pin_num] = {A4, A5, A6};
1313

1414
// must be:
15-
// 1. multiple of 32 words (64 half-words) to ensure cache coherence
15+
// 1. multiple of 32 bytes to ensure cache coherence
1616
// 2. properly aligned
1717
const uint16_t memory4adc1_size = 64 * adc1_pin_num;
1818
const uint16_t memory4adc2_size = 64 * adc2_pin_num;

libraries/SensEdu/examples/Read_ADC_1CH_DMA/Read_ADC_1CH_DMA.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ uint32_t cntr = 0;
88
/* -------------------------------------------------------------------------- */
99

1010
// must be:
11-
// 1. multiple of 32 words (64 half-words) to ensure cache coherence
11+
// 1. multiple of 32 bytes to ensure cache coherence
1212
// 2. properly aligned
1313
const uint16_t memory4adc_size = 128;
1414
__attribute__((aligned(__SCB_DCACHE_LINE_SIZE))) uint16_t memory4adc[memory4adc_size];

0 commit comments

Comments
 (0)