|
1 | 1 | Examples
|
2 | 2 | ======
|
3 | 3 |
|
| 4 | +## Parts with a SMPS |
| 5 | + |
| 6 | +For these parts, the program needs to know more about the power supply |
| 7 | +scheme in order to successfully transition from Run* mode to Run mode. For |
| 8 | +an explaination of Run* mode, see RM0433 Rev 7 Section 6.6.1 "System/D3 |
| 9 | +domain modes". |
| 10 | + |
| 11 | +For your own code, see the |
| 12 | +[documentation](https://docs.rs/stm32h7xx-hal/latest/stm32h7xx_hal/pwr/index.html#smps) |
| 13 | +for the builder methods on `pwr`. However to make things easier for the |
| 14 | +examples, there are feature flags that set common power configurations. |
| 15 | + |
| 16 | +Flag | Situation | Applicable Boards (non-exhaustive) |
| 17 | +---|---|--- |
| 18 | +`example-smps` | Board uses Internal SMPS | Any Nucleo with `-Q` suffix |
| 19 | +`example-ldo` | Board uses LDO, internal SMPS unconnected | |
| 20 | +none | Parts without internal SMPS | |
| 21 | + |
| 22 | +The results of using the wrong power configuration for your hardware are |
| 23 | +undefined(!). If you can still access the debug port, load a simple example |
| 24 | +with the correct power configuration and power cycle the board. |
| 25 | + |
| 26 | +## Logging |
| 27 | + |
| 28 | +Example specific features have been defined to enable different logging outputs for the examples. |
| 29 | +If no logging feature is selected logging will be disabled and the panic handler will be halt. |
| 30 | +Supported logging methods are: |
| 31 | + |
| 32 | +### RTT (Real Time Trace) |
| 33 | + |
| 34 | +Compile with the feature log-rtt |
| 35 | + |
| 36 | +``` |
| 37 | +cargo build --features=stm32h750v,rt,log-rtt --examples |
| 38 | +``` |
| 39 | + |
| 40 | +### Semihosting |
| 41 | + |
| 42 | +Compile with the feature log-semihost. Note this method of logging is very slow. |
| 43 | + |
| 44 | +``` |
| 45 | +cargo build --features=stm32h750v,rt,log-semihost --examples |
| 46 | +``` |
| 47 | + |
| 48 | + |
| 49 | +### ITM (Instrumentation Trace Macrocell) |
| 50 | +Compile with the feature log-itm |
| 51 | + |
| 52 | +``` |
| 53 | +cargo build --features=stm32h750v,rt,log-itm --examples |
| 54 | +``` |
| 55 | + |
| 56 | +Note that you may need to configure your debugger to output ITM, and/or |
| 57 | +configure the ITM yourself. See [ITM.md](ITM.md) |
| 58 | + |
| 59 | +If you select this feature flag, then the call to `logger::init()` internally |
| 60 | +configures the ITM peripheral. If you also interact with the ITM peripheral |
| 61 | +yourself, you should be aware that it has already been configured. |
| 62 | + |
| 63 | + |
4 | 64 | ## Starting your own project
|
5 | 65 |
|
6 | 66 | Although you can compile the provided examples directly, for your own project it
|
@@ -52,62 +112,3 @@ is contained within the [examples folder](https://github.com/stm32-rs/stm32h7xx-
|
52 | 112 |
|
53 | 113 | 8. Flashing the MCU typically works differently for different boards. You can
|
54 | 114 | usually find instructions in the board specific crates or BSPs.
|
55 |
| - |
56 |
| -## Logging |
57 |
| - |
58 |
| -Example specific features have been defined to enable different logging outputs for the examples. |
59 |
| -If no logging feature is selected logging will be disabled and the panic handler will be halt. |
60 |
| -Supported logging methods are: |
61 |
| - |
62 |
| -### RTT (Real Time Trace) |
63 |
| - |
64 |
| -Compile with the feature log-rtt |
65 |
| - |
66 |
| -``` |
67 |
| -cargo build --features=stm32h750v,rt,log-rtt --examples |
68 |
| -``` |
69 |
| - |
70 |
| -### Semihosting |
71 |
| - |
72 |
| -Compile with the feature log-semihost. Note this method of logging is very slow. |
73 |
| - |
74 |
| -``` |
75 |
| -cargo build --features=stm32h750v,rt,log-semihost --examples |
76 |
| -``` |
77 |
| - |
78 |
| - |
79 |
| -### ITM (Instrumentation Trace Macrocell) |
80 |
| -Compile with the feature log-itm |
81 |
| - |
82 |
| -``` |
83 |
| -cargo build --features=stm32h750v,rt,log-itm --examples |
84 |
| -``` |
85 |
| - |
86 |
| -Note that you may need to configure your debugger to output ITM, and/or |
87 |
| -configure the ITM yourself. See [ITM.md](ITM.md) |
88 |
| - |
89 |
| -If you select this feature flag, then the call to `logger::init()` internally |
90 |
| -configures the ITM peripheral. If you also interact with the ITM peripheral |
91 |
| -yourself, you should be aware that it has already been configured. |
92 |
| - |
93 |
| -## Parts with a SMPS |
94 |
| - |
95 |
| -For these parts, the program needs to know more about the power supply |
96 |
| -scheme in order to successfully transition from Run* mode to Run mode. For |
97 |
| -an explaination of Run* mode, see RM0433 Rev 7 Section 6.6.1 "System/D3 |
98 |
| -domain modes". |
99 |
| - |
100 |
| -For your own code, see the |
101 |
| -[documentation](https://docs.rs/stm32h7xx-hal/latest/stm32h7xx_hal/pwr/index.html#smps) |
102 |
| -for the builder methods on `pwr`. However to make things easier for the |
103 |
| -examples, there are feature flags that set common power configurations. |
104 |
| - |
105 |
| -Flag | Situation | Applicable Boards (non-exhaustive) |
106 |
| ----|---|--- |
107 |
| -`example-smps` | Board uses Internal SMPS | Any Nucleo with `-Q` suffix |
108 |
| -`example-ldo` | Board uses LDO, internal SMPS unconnected | |
109 |
| -none | Parts without internal SMPS | |
110 |
| - |
111 |
| -The results of using the wrong power configuration for your hardware are |
112 |
| -undefined(!). If you can still access the debug port, load a simple example |
113 |
| -with the correct power configuration and power cycle the board. |
|
0 commit comments