Is it possible to use at least one channel of the TAMPC in a Zephyr application on the nRF54L15-DK? It appears that the channel 0 pins (p1.4 and p1.5) are used by the UART on the DK. According to the tables on the back of the DK board, p1.11 and p1.12 aren't connected to anything. Can those be used for channel 3 of the TAMPC? If so, how do I go about using them to test the PRBS tamper detection? I can compile this code for channel 0, but if I change the reference to channel 3 it doesn't compile.
int tampc_active_shield_init(tampc_callback_t callback)
{
user_callback = callback;
/* Clear any pending events */
nrf_tampc_event_clear(NRF_TAMPC, NRF_TAMPC_EVENT_TAMPER);
#if NRF_TAMPC_HAS_EVENT_WRITE_ERROR
nrf_tampc_event_clear(NRF_TAMPC, NRF_TAMPC_EVENT_WRITE_ERROR);
#endif
/* Enable active shield channel 3 */
#if NRF_TAMPC_HAS_ACTIVE_SHIELD_CHANNELS
nrf_tampc_activeshield_channel_enable(NRF_TAMPC, NRF_TAMPC_ACTIVESHIELD_CHANNEL_3_MASK);
printk("Active shield channel 3 enabled\n");
#else
printk("Active shield channels not available on this device\n");
return -ENOTSUP;
#endif
/* Enable TAMPER interrupt */
nrf_tampc_int_enable(NRF_TAMPC, NRF_TAMPC_INT_TAMPER_MASK);
/* Connect and enable IRQ - TAMPC_IRQn is 220 on nRF54L15 */
IRQ_CONNECT(TAMPC_IRQn, 1, tampc_irq_handler, NULL, 0);
irq_enable(TAMPC_IRQn);
printk("TAMPC initialized, IRQn=%d\n", TAMPC_IRQn);
printk("INTENSET=0x%08x\n", nrf_tampc_int_enable_check(NRF_TAMPC, NRF_TAMPC_ALL_INTS_MASK));
return 0;
}
Overlay for configuring p1.11 and p1.12:
/&peripheral_domain {
tamper0: tampc@5003a000 {
compatible = "nordic,nrf54l15-tampc";
reg = <0x5003A000 0x1000>;
channel-count = <4>;
/* ASO3 = P1.11, ASI3 = P1.12 */
aso-pins = <&gpio1 11 GPIO_ACTIVE_HIGH>;
asi-pins = <&gpio1 12 GPIO_ACTIVE_HIGH>;
};
};