File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
src/modm/platform/iwdg/stm32 Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
406
406
<td align =" center " >✅</td >
407
407
<td align =" center " >✅</td >
408
408
<td align =" center " >✅</td >
409
- <td align =" center " >○ </td >
409
+ <td align =" center " >✅ </td >
410
410
<td align =" center " >✅</td >
411
411
<td align =" center " >✅</td >
412
412
<td align =" center " >✅</td >
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ class Iwdg : public ::modm::PeripheralDriver
50
50
initialize(Prescaler prescaler, uint16_t reload)
51
51
{
52
52
writeKey(writeCommand);
53
- IWDG->PR = uint32_t (prescaler);
54
- IWDG->RLR = reload;
53
+ IWDG{{core}} ->PR = uint32_t(prescaler);
54
+ IWDG{{core}} ->RLR = reload;
55
55
writeKey(0); // disable access to PR and RLR registers
56
56
}
57
57
@@ -82,14 +82,14 @@ class Iwdg : public ::modm::PeripheralDriver
82
82
static inline Status
83
83
getStatus()
84
84
{
85
- return Status (IWDG->SR );
85
+ return Status(IWDG{{core}} ->SR);
86
86
}
87
87
88
88
private:
89
89
static inline void
90
90
writeKey(uint16_t key)
91
91
{
92
- IWDG->KR = key;
92
+ IWDG{{core}} ->KR = key;
93
93
}
94
94
95
95
static constexpr uint16_t reloadCommand = 0xAAAA;
Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ def init(module):
17
17
18
18
def prepare (module , options ):
19
19
device = options [":target" ]
20
- # STM32H7 is not yet supported with any IWDG implementation
21
- if device .identifier .family in ["h7" ]:
22
- return False
23
20
24
21
module .depends (":cmsis:device" , ":math:algorithm" )
25
22
return device .has_driver ("iwdg:stm32" )
26
23
27
24
28
25
def build (env ):
29
26
env .outbasepath = "modm/src/modm/platform/iwdg"
30
- env .copy ("iwdg.hpp" )
27
+ # FIXME: Use IWDG2 for second core on STM32H7x5
28
+ env .substitutions = {"core" : 1 if env [":target" ].identifier .family in ["h7" ] else "" }
29
+ env .template ("iwdg.hpp.in" )
You can’t perform that action at this time.
0 commit comments