[Cryptech-Commits] [sw/stm32] 08/08: Amend 833802c: Add reentrancy protection to fmc_write_32.
git at cryptech.is
git at cryptech.is
Wed Jul 6 23:03:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch master
in repository sw/stm32.
commit bc43cb1ce59ce5a628025a91d36868b0bf4791a4
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Wed Jul 6 18:23:56 2016 -0400
Amend 833802c: Add reentrancy protection to fmc_write_32.
---
stm-fmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/stm-fmc.c b/stm-fmc.c
index 01e642c..05d41b4 100644
--- a/stm-fmc.c
+++ b/stm-fmc.c
@@ -77,12 +77,16 @@ int fmc_write_32(uint32_t addr, uint32_t *data)
// calculate target fpga address
uint32_t ptr = FMC_FPGA_BASE_ADDR + (addr & FMC_FPGA_ADDR_MASK);
+ __disable_irq();
+
int status =
// write data to fpga
(HAL_SRAM_Write_32b(&_fmc_fpga_inst, (uint32_t *)ptr, data, 1) != HAL_OK) ||
// wait for transaction to complete
_fmc_nwait_idle();
+ __enable_irq();
+
return status;
}
More information about the Commits
mailing list