2000A current sensing using STM32
The field from 2000A flowing in a conductor will be quite significant, and linear with the current. Just dangle an analogue output Hall effect IC close to the cable.

Better still, have two Hall effect ICs, one either side of the wire. Align one up, one down, so they both read the conductor field in the same direction, but read external fields in opposite directions. Add them together, and this arrangement will reject external fields. Feed detected voltage into the STM32's ADC.