[<<][stm32f1][>>][..]
Mon Jan 20 07:16:57 EST 2020

Disabling application

It's doing something I don't understand.
Let's try not enabling interrupts maybe?

The command is executed from the USB poll routine.


EDIT: Reload works if I don't enable any interrupts.
Once I enable timer it starts failing.

I can't figure out how to turn off the damn interrupt.  Everything
works as long as I don't enable the timer.

Odd.

If peripheral reset doesn't work, what will?

How to move this forward?  Find out if assumptions are correct.
I.e. make sure app is not started etc..



How bad do I want this?
For one application I can probably use external reset.

I just don't get it..

This is a time sink.

Here's one thing to try: put the interrupt table and all handlers in
RAM.  That would for sure remove the case that it is jumping into
Flash code.

Maybe there is some interrupt that I'm not aware of?
But then it should still have an issue when timer wasn't initialized.

Something weird is going on.  Maybe check errata?

It has to be an interrupt, so list the entire interrupt table.

(gdb) p/x *(vector_table_t*)0x8003000
$16 = {initial_sp_value = 0x20005000, reset = 0x8003941, nmi = 0x8003907, 
  hard_fault = 0x8003905, memory_manage_fault = 0x8003905, bus_fault = 0x8003905, 
  usage_fault = 0x8003905, reserved_x001c = {0x0, 0x0, 0x0, 0x0}, sv_call = 0x8003907, 
  debug_monitor = 0x8003907, reserved_x0034 = 0x0, pend_sv = 0x8003907, 
  systick = 0x8003907, irq = {0x8003905 <repeats 28 times>, 0x80038d5, 0x8003905, 
    0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 
    0x8003885, 0x8003905 <repeats 30 times>}}

(gdb) p/x *(vector_table_t*)0x8000000
$17 = {initial_sp_value = 0x20002000, reset = 0x8000231, nmi = 0x80001f7, 
  hard_fault = 0x80001f5, memory_manage_fault = 0x80001f5, bus_fault = 0x80001f5, 
  usage_fault = 0x80001f5, reserved_x001c = {0x0, 0x0, 0x0, 0x0}, sv_call = 0x80001f7, 
  debug_monitor = 0x80001f7, reserved_x0034 = 0x0, pend_sv = 0x80001f7, 
  systick = 0x80001f7, irq = {0x80001f5 <repeats 68 times>}}


irq = {0x8003905 <repeats 28 times>, 0x80038d5, 0x8003905, 
    0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 0x8003905, 
    0x8003885, 0x8003905 <repeats 30 times>}}

(gdb) p/x (void*)tim2_isr
$20 = 0x80038d4

(gdb) p/x (void*)usart1_isr
$21 = 0x8003884


Yeah nothing surprising there.
Maybe disable interrupts altogether?
Or look at the flash write?

I'm just guessing... Pick this up again if it is really necessary,
otherwise work around it.

UNRESOLVED




[Reply][About]
[<<][stm32f1][>>][..]