Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

从3.x迁移到4.1,F401RCT,Freertos,出现Hardfault #158

Open
ss1969 opened this issue Sep 2, 2023 · 0 comments
Open

从3.x迁移到4.1,F401RCT,Freertos,出现Hardfault #158

ss1969 opened this issue Sep 2, 2023 · 0 comments

Comments

@ss1969
Copy link

ss1969 commented Sep 2, 2023

以前是3.x版本,STM32F401RCT6,Freertos,M24C32。EasyFlash跑在4KB的24C32上,读写函数是自写使用硬件I2C的读写函数。一切正常。
现在更新到4.1,有几个问题:
1,Write Gran 应该是多少?我认为是8
2,Sector设多少合适,我用1024
3,现在单步跑到写24C32的代码会引发HardFault,BFARVALID,PRECISERR,FORCED置位;使用cm_backtrace提示freertos的defaultThread stackoverflow,但是把stack size从1KB增大到4KB都无效。

`
Flash ENV start address is 0x00000000, size is 4096 bytes.

[Flash]Warning: Sector header check failed. Format this sector (0x00000400).

[Flash]Warning: Sector header check failed. Format this sector (0x00000800).

[Flash]Warning: Sector header check failed. Format this sector (0x00000c00).

Firmware name: WWJ, hardware version: v1, software version: v76
Fault on thread defaultTask
stack_pointer: 0x20008510, stack_start_addr: 0x200082b8, stack_end_addr: 0x200082b8
Error: Thread stack(20008510) was overflow
===== Thread stack information =====

=================== Registers information ====================
R0 : 20010000 R1 : 20004744 R2 : 00001620 R3 : 00000007
R12: 00000010 LR : 0800e22f PC : 0800a4ba PSR: 61000000

Bus fault is caused by precise data access violation
The bus fault occurred address is 20010000
Dump call stack has an error
`

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant