I migrated from v3.5.1 to v3.7.9 and I fell calling a null function (I didn't call atca_register_ecdh_slot_cb before calling mbedtls_ecdh_gen_public). I assume that troubleshooting this issue could be easier.
Here is the call to the function: https://github.com/MicrochipTech/cryptoauthlib/blob/7f00156/lib/mbedtls/atca_mbedtls_ecdh.c#L69
In version 3.5.1, atca_mbedtls_ecdh_slot_cb was called instead of g_mbedtls_slot_cb which need to be registered.