I am using a STM32 with the NPMX drivers.
I am having a few issues and wanted to see if there are recommendations.
Issue 1:
disabling the interrupts does not seem to work
// Clear all events before enabling interrupts, just in case other interrupt source was configured before.
for (uint32_t i = 0; i < NPMX_EVENT_GROUP_COUNT; i++) {
npmx_err = npmx_core_event_interrupt_disable(&npm1300_instance, (npmx_event_group_t)i, NPMX_EVENT_GROUP_ALL_EVENTS_MASK);
if(npmx_err == NPMX_SUCCESS)
{
printf("Event Cleared\n");
osDelay(100);
}
the above code comes from the PORTING Guide.
when i run that block it looks like it never reaches the NPMX_SUCCESS
I have attached the I2C transactions

it looks like it is writing 0x00 and not 0xFF as I would expect.
Issue 2:
I am trying to set a GPIO as an Interrupt.
npmx_error_t ret; npmx_gpio_t *npmx_gpio_struct; // Set GPIO 3 as GPIO Interrupt. // npmx_gpio_struct = npmx_gpio_get(&npm1300_instance, 3); ret = npmx_gpio_mode_set(&npmx_gpio_struct, NPMX_GPIO_MODE_OUTPUT_IRQ);
when i run this it does not look like I get the Index of 3 and I cannot tell about the pointer to the I2C Instance

then the call to npmx_gpio_mode_set throws a hard Fault.
I have tried it with declaring a separate npmx_gpio_t structure and inline declaration like the porting guide. They both throw faults.
which I guess I should ask if the init function call from the porting guide
static npmx_error_t my_i2c_write_function(void * p_context, uint32_t register_address, uint8_t * p_data, size_t num_of_bytes);
static npmx_error_t my_i2c_read_function(void * p_context, uint32_t register_address, uint8_t * p_data, size_t num_of_bytes);
static void my_npmx_initialization_function(void)
{
npm1300_backend.p_read = my_i2c_read_function;
npm1300_backend.p_write = my_i2c_write_function;
npm1300_backend.p_context = NULL; // Optional context for our use
npmx_error_t npmx_err = npmx_core_init(&npm1300_instance, &npm1300_backend, NULL, true);
// TODO: Verify that npmx_err == NPMX_SUCCESS
}
should give me a I2C like this

it appears to write 0x05 and 0x09, then read 0x00.
is this expected from the init Function?
I am looking more into it, but any guidance can help