EMLIB to Peripheral HAL Migration Guide: Considerations#

Migration Considerations#

Coexistence:

  • Both libraries can coexist during migration for Series 2

  • This should be avoided in the long run to reduce code size

  • No direct compatibility layer available

Code Changes Required:

  • API calls require modification (not just renaming)

  • Initialization sequences need restructuring

  • Clock management must be handled explicitly

Testing Requirements:

  • Behavioral equivalence testing essential

  • Register-level verification recommended

  • Consider incremental migration approach

  • Integration testing with full system

When to Migrate#

Migrate now if:

  • Starting a new Series 3 project (required)

  • Beginning a new Series 2 project (recommended)

  • Adding significant new peripheral functionality

  • Refactoring existing peripheral code

  • Planning long-term product lifecycle

Consider delaying if:

  • Stable Series 0/1/2 product with no Series 3 plans

  • Limited development resources

  • Near end-of-life for existing product

  • No significant new features planned

Incremental Migration:

  • Migrate peripheral-by-peripheral

  • Start with least complex peripherals

  • Test thoroughly between migrations

  • Maintain regression test suite