Pular para o conteúdo principal
Knowledgebase
Home
Renesas Brasil - Knowledgebase

How do I use the GPT timer for complimentary outputs within SSP?

Latest Updated:10/24/2016

Question:

How do I create complimentary outputs using the GPT in SSP?

Answer:

As of SSP 1.1.3, this mode isn't yet available with the SSP configurator. However the desired behavior can be achieved using 1 additional register write after opening the timer driver. A simple HAL project that illustrates how it's done on the SK-S7 is attached.

CompPWM (1).zip

Bear in mind that since period values for pins A and B are stored in different registers, you'll need to call the periodSet function twice, once for each pin (last argument 0 and then 1). Since period registers are buffered, you won't cause any de-synchronization between the pins by changing their periods one after the other.

Suitable Products
SSP