so after i started reverse engineering the bslapp and protocol to the board and started coding my own api in python (much like Balor for lmc boards) i found what i knew a year ago allready, just more in detail.
Tickle
Endpoint: 0x02. It is a job parameter, and the board ACKs parameter commands on EP 0x06 silently ignores them. It has to go inline in the EP 0x02 batch.
Command 0x0217, the standard 12-byte big-endian tagSeaCMD:
+0x00 CMD_ID = 0x0217
+0x02 Param0 flags << 8 bit0 (0x0100) ENPWMTICK enable
bit1 (0x0200) ENCO2FPK
+0x04 Param1 period, 48 MHz ticks
+0x06 Param2 width, 48 MHz ticks
+0x08 Param3 CO2FPKSTARTPOWER term, sent as 0
+0x0A Param4 CO2FPKINCPOWER term, sent as 0
Enable is Param0 bit 8, so 0x0100 on, 0x0000 off. The flag byte is in the high half of Param0.
Scaling, both against the 48 MHz FPGA clock:
period = round(48000.0 / freq_khz) # N+1 counter, so f_out = 48e6 / (period + 1)
width = round(width_us * 48.0)
Concrete frames:
5 kHz, 1 us, on 02 17 01 00 25 80 00 30 00 00 00 00 period 9600, width 48
20 kHz, 5 us, on 02 17 01 00 09 60 00 F0 00 00 00 00 period 2400, width 240
off 02 17 00 00 25 80 00 30 00 00 00 00
Two behaviours that bite:
- It free-runs. It keeps pulsing after the job ends and after your process exits. Only
tick_off(), laser_off() or a reset stops it.
- It is muxed with the marking PWM, not summed. no tickle in the low pwm phases which is fine i guess. its fast enough anyways