Did my STM32L496 Disco arrive with broken internal settings?
Hello,
I have recently purchased an STM32L496 Discovery Kit to play around with and get familiar with the chip. I have decided to start porting some of my OS from a different board to this board, but before I even got to that stage I ran into some issues.
When I set up the vector table for the chip at the start of the flash and have the 2nd entry be the address of a simple function running in a loop for testing, it won't even make it there. It appears no matter what I do it immediately enters the handler for the Hard Fault. That is to say, it never even jumps to the start function, so it isn't my code triggering the Hard Fault. The UFSR register is giving me an INVSTATE, but that doesn't make sense as I haven't executed any code yet.
There appear to be some other issues as well with the board:
* Using the command `st-flash write ./arm.bin 0x08000000` gives me back the error "Unknown Memory Region" as well as reporting there is no flash "INFO common.c: L496x/L4A6x: 256 KiB SRAM, 0 KiB flash in at least 2 KiB pages"
* Using the arm gdb to flash an .elf file using the load command immediately fails
* Forcing a flash using the above st-flash command in combination with the `--flash=1m` flag does work, but it ends up immediately triggering a Hard Fault as explained above.
* The st-util utility on linux reports flash sizes of 448kb, 0kb, 12338kb 65xxxkb, etc.. everytime I fire up the utility.
* The ST-LINK utility on windows does appear to be able to flash it, but the core instantly locks and gets stuck in the Hard Fault handler loop.
So my question is, is this board broken? Is there any way of saving it?
Thanks for your help
Output from st-info --probe:
~/STM32L4/toolchain/stm32_dev/stlink-develop/bin/st-info --probe
Unrecognized flash type
---------- old ------------
# Chip-ID file for L496x/L4A6x
#
chip_id 0x461
description L496x/L4A6x
flash_type 6
flash_pagesize 0x800
sram_size 0x40000
bootrom_base 0x1fff0000
bootrom_size 0x7000
option_base 0x1fff7800
option_size 0x4
flags 2
---------- new ------------
# Chip-ID file for L496x/L4A6x
#
chip_id 0x461
description L496x/L4A6x
flash_type 6
flash_pagesize 0x800
sram_size 0x40000
bootrom_base 0x1fff0000
bootrom_size 0x7000
option_base 0x1fff7800
option_size 0x4
flags 2
Found 1 stlink programmers
version: V2J37S26
serial: 066CFF343636574D43044929
flash: 0 (pagesize: 2048)
sram: 262144
chipid: 0x0461
---------- old ------------
# Chip-ID file for L496x/L4A6x
#
chip_id 0x461
description L496x/L4A6x
flash_type 6
flash_pagesize 0x800
sram_size 0x40000
bootrom_base 0x1fff0000
bootrom_size 0x7000
option_base 0x1fff7800
option_size 0x4
flags 2
---------- new ------------
# Chip-ID file for L496x/L4A6x
#
chip_id 0x461
description L496x/L4A6x
flash_type 6
flash_pagesize 0x800
sram_size 0x40000
bootrom_base 0x1fff0000
bootrom_size 0x7000
option_base 0x1fff7800
option_size 0x4
flags 2
descr: L496x/L4A6x