AnsweredAssumed Answered

Set Peripheral Chip Select using custom Pin Labels

Question asked by Andy Berger on Oct 25, 2019
Latest reply on Nov 4, 2019 by Alice_Yang

In MCUXpresso's Config Tools, when configuring a DSPI module to use a particular pin for the Peripheral Chip Select, the drop down menu displays the custom Pin Labels I have defined in the Pin tool (see below):


In the generated code, I am unable to find any sort of mapping between my custom Pin Labels and the enum _dspi_which_pcs_config which is used to select the Chip Select when passing a dspi_master_config_t along to DSPI_MasterInit().  However, the generated initialization routine properly uses kDSPI_Pcs0 as the dspi_which_pcs_t, since that is somehow linked to my CS_LED pin.


Does this mapping exist explicitly somewhere (for example, through some #defines), so that the PCS can be changed during execution by using my custom Pin Labels? I could obviously manually create this by writing something like:

#define PCS_LED kDSPI_Pcs0

#define PCS_7SEG kDSPI_Pcs1


but it seems that Config Tools is already creating this mapping somewhere, I'm just unable to find it.