How start 0.000001 timer?

Hi!
q: how start 0.000001 timer?
I try to work with Ticker.
To start timer I use:

void PrintTextOnLCD (int x, int y, int val){
    Sample_Timer.detach();
    //printf("val: %d \n\r", val);
    led = !led;
    Sample_Timer.attach(&Timer_Step, 0.000001);
}

But OS crashed with message :

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0   : 240007A4
R1   : 0108F06F
R2   : 00000008
R3   : 00010001
R4   : 240007A4
R5   : 00000000
R6   : 00000000
R7   : 00000000
R8   : 00000000
R9   : 00000000
R10  : 00000000
R11  : 00000000
R12  : 08010BB1
SP   : 24002AB8
LR   : 080099DD
PC   : 0108F06E
xPSR : 21000000
PSP  : 24002A50
MSP  : 2407FF88
CPUID: 411FC271
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000001
UFSR : 00000000
DFSR : 0000000B
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP

-- MbedOS Fault Handler --



++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x108F06E
Error Value: 0x24002CA0
Current Thread: main Id: 0x24004A3C Entry: 0x800DDE1 StackSize: 0x1000 StackMem: 0x24001AE0 SP: 0x24002AB8 
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=NUCLEO_H743ZI2
-- MbedOS Error Info --

void Timer_Step(){
    //led = !led;
    TIMER_STEP_FLAG = 1;
    TIMER_STEP_VAL = TIMER_STEP_VAL + 1;
}

Hello,

it is equal to 1us right? But 1us seems to be too much. I did not see the crash like you have, probably because the code is not same, but my board just freeze. My board is working with 5us and above.

Your syntax is not wrong but deprecated. So, accordint to Ticker docs

Sample_Timer.attach(callback(&Timer_Step), 5us);

I tested it on Nucleo-F767ZI with MbedOS 6.15

BR, Jan