Packaging of the electronic circuit in a casing