We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbb4d66 commit 1e4fbc4Copy full SHA for 1e4fbc4
1 file changed
hal/stm32_tz.c
@@ -200,9 +200,12 @@ void hal_tz_release_nonsecure_area(void)
200
201
#define SET_GTZC1_MPCBBx_SECCFGR_VCTR(bank,n,val) \
202
(*((volatile uint32_t *)(GTZC1_MPCBB##bank##_SECCFGR) + n )) = val
203
-/* PRIVCFGR_VCTR sits 0x100 after SECCFGR_VCTR in each MPCBB block. */
+/* PRIVCFGR_VCTR sits 0x100 bytes (0x40 words) after SECCFGR_VCTR in each
204
+ * MPCBB block. */
205
+#define GTZC_MPCBB_PRIVCFGR_WORD_OFFSET (0x100u / sizeof(uint32_t))
206
#define SET_GTZC1_MPCBBx_PRIVCFGR_VCTR(bank,n,val) \
- (*((volatile uint32_t *)(GTZC1_MPCBB##bank##_SECCFGR) + 64 + n )) = val
207
+ (*((volatile uint32_t *)(GTZC1_MPCBB##bank##_SECCFGR) + \
208
+ GTZC_MPCBB_PRIVCFGR_WORD_OFFSET + n )) = val
209
210
void hal_gtzc_init(void)
211
{
0 commit comments