Hi I have a newlly started application on an SK-S7G2 starter kit, practically a simple extension of the netx duo http server example. The application works fine so far. I have reached to the point that I would like to have a better understanding of the overall workings of the system so I've tried to include the ThreadX source in the HAL/commons thread in the configurator. I have scrolled to the bottom of the properies and set the "show linkage warning" to Disabled, and the application builds fine. The problem is that when i try to run the application it crashes in a very early stage into the NMI interupt service routine with reasons that seems to be "BSP_GRP_IRQ_RAM_PARITY" and "BSP_GRP_IRQ_MPU_STACK". The first impression that I get is that the precompiled version of the ThreadX has different settings from the defaults that are applied when I include the ThreadX source. Do you have any suggestions? Thank you in advance for your response
↧
Forum Post: Working application failes when adding ThreadX source
↧
Forum Post: RE: Working application failes when adding ThreadX source
Try added the source code for NetX (and any NetX applications) as well.
↧
↧
Forum Post: RE: Working application failes when adding ThreadX source
Just tried that, the problem persists
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Hi Warren, I'm using e2 Studio 7.0 and SSP 1.4.0. I configure the I2C using r_riic_slave device. As the scope show, the master sending correct slave address to the slave device, but the slave response with NACK most of the time. Below is the procedure I used. - The slave device wait for the master to write with the correct slave address+W bit and the opcode - The slave then wait for the master to send the slave address+R bit the it will response back with the data. I got the code below works with one of our instrument(not very reliable) but absolutely not with other, and the problem is the slave always response with NACK Please let me know if I miss anything. // Initial i2c slave here ........ while (1) { // SMBUS is in idle stage waiting for master command g_smbus_slave.p_api->masterWriteSlaveRead(g_smbus_slave.p_ctrl, received_buffer, 1); // Allow until the transmission happen and complete while(false == slave_rx_complete); slave_rx_complete = false; transmite_buffer[] = some data byte; g_smbus_slave.p_api->masterReadSlaveWrite(g_smbus_slave.p_ctrl, transmite_buffer, 3); while(false == slave_tx_complete); slave_tx_complete = false; tx_thread_sleep(5); void smbusSlaveCallBack (i2c_callback_args_t * p_args) { slave_aborted = false; if (I2C_EVENT_RX_COMPLETE == p_args->event) { slave_rx_complete = true; } else if (I2C_EVENT_TX_COMPLETE == p_args->event) { slave_tx_complete = true; } else if (I2C_EVENT_ABORTED == p_args->event) { slave_aborted = true; g_smbus_slave.p_api->close(g_smbus_slave.p_ctrl); g_smbus_slave.p_api->open(g_smbus_slave.p_ctrl, g_smbus_slave.p_cfg); } }
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Hi Cooper- Have you compared your code to the code in the I2C Slave Module Guide here: www.renesas.com/.../D6001921.html Warren
↧
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Hi Cooper- Some other points: I don't see an open API call in your code. Is the module opened somewhere prior to the code you show? Looks like you are doing close and open within the callback. It's usually not a good idea to do functions that can take a long time in a callback- just setting flags or something simple, so you don't 'lock out' other processing. Can you change your code to remove these calls? Warren
↧
Forum Post: RE: Working application failes when adding ThreadX source
Hi vgryp: Can you tell us what version of the tools are you using? Also- can you share the pertinent call stack info so we can (maybe) see where the program enters the NMI routine from? Warren
↧
Forum Post: RE: I2C not ACK using S128 as slave device
One other note I would like to mention is if the I2C port is configured for 7-bit and the address of the device is above 0x7F you will need to shift right the address of the device you are communicating with.
↧
Forum Post: RE: Bootloader from USB for S7
Eliezer and all, This AN is applicable only to SSP 1.3.x. Please see the link below. www.renesas.com/.../flashloader-add-on-and-application-projects.html If you would like to use the AN with SSP 1.3.x, import the project and you should see the bootloader projects. We cannot continue to support this AN as it is outdated but is still made available as an example and a starting point. Thanks, Fatih
↧
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Hi Warren, I do have API open call at the beginning of the thread entry. I did look at the i2c module guide and following it. One thing I'm not sure why the example start with a slave write first. I believe the master initial the write first also generate the clock! Thanks.
↧
Forum Post: RE: SD Card fx_media_open() returning FX_IO_ERROR on SSP v1.5.0 and v1.5.1
Jeff, I am also trying to get block media to work under SSP 1.5.0 Do you have a simple project that only accesses the SD card that I could try on my board. I am using SDHI0 on pins P411,P412,P413.
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Perhaps this might help: For some examples this is a process that I used for talking to devices on the SMBus #define APP_ERR_TRAP(a) if(a) {__asm("BKPT #0\n");} /* trap the error return != 0*/ #define ISL28023_ADDR (0x40) // Address is 0x80 but I2C driver not adjusting for 7-bit address. // Set the address of the slave and the addressing mode for the DPM Set_Slave_Addr(ISL28023_ADDR); reg = DPM_CHIP_ID_REG; // register for the chip ID /* put the address out on the I2C bus for the device */ g_Sensor_Bus_Done = false; err = g_sensor_bus.p_api->write(g_sensor_bus.p_ctrl,®,1,true); //Send Start but do not send STOP APP_ERR_TRAP(err) // trap here if failed while(!g_Sensor_Bus_Done); /* request the read of the address just placed on the bus */ g_Sensor_Bus_Done = false; err = g_sensor_bus.p_api->read(g_sensor_bus.p_ctrl,&data[0],9,false); APP_ERR_TRAP(err) while(!g_Sensor_Bus_Done); ============================= /* prototypes */ ssp_err_t Set_Slave_Addr( uint16_t const slave); void g_sensor_bus_callback(i2c_callback_args_t * p_args); ssp_err_t Set_Slave_Addr( uint16_t const slave) { if (SSP_SUCCESS == g_sensor_bus.p_api->slaveAddressSet(g_sensor_bus.p_ctrl, slave, I2C_ADDR_MODE_7BIT)) { return(SSP_SUCCESS); } return(SSP_ERR_IN_USE); } void g_sensor_bus_callback(i2c_callback_args_t * p_args) { if (p_args->event) { /* I2C_EVENT_ABORTED = 1, A transfer was aborted I2C_EVENT_RX_COMPLETE = 2, A receive operation was completed successfully I2C_EVENT_TX_COMPLETE = 3 A transmit operation was completed successfully */ g_Sensor_Bus_Done = true; } }
↧
Forum Post: RE: I2C not ACK using S128 as slave device
Hi Michael, Thanks for the advise. However, in my case, I tried to create a slave device. Master is the third party unit.
↧
↧
Forum Post: RE: Errors in Pin Configuration when using ADC with external reference
I am not so sure the error in the Pin configurator can be ignored, when setting the VREF pins. Using SSP 1.5.3 and e2studio 6, a project for S3A3-TB:- In the pin configuration, set P0_13 as VREFL (the error is shown) :- In the generated pin configuration data, in src/synergy_gen/pin_data.c :- .pin = IOPORT_PORT_00_PIN_13, .pin_cfg = (IOPORT_PERIPHERAL_CAC_AD), and IOPORT_PERIPHERAL_CAC_AD = (0x0AUL pinCfg(IOPORT_PORT_00_PIN_13, IOPORT_CFG_ANALOG_ENABLE); Or, configure AN08 as an analog input :- then the generated pin config data in src/synergy_gen/pin_data.c is :- .pin = IOPORT_PORT_00_PIN_13, .pin_cfg = (IOPORT_CFG_ANALOG_ENABLE),
↧
Forum Post: RE: S7G2 block media on sd card
It looks like a combination of several problems. First, we discovered that the hardware engineer thought we were using SPI interface, so used pull downs. We patched the board to use pullup on CMD and DAT0. In the above example, the media on fileX has auto initialization disabled, and a call to fx_media_open used at the start of the thread. I had it enabled, thinking it would open the media for me. This seems to be the magic sauce that worked for me.
↧
Forum Post: RE: S7G2 block media on sd card
This has been resolved. There were 2 problems that I discussed in a different thread. One was changing the pulldowns to pullups. The other was to call media_open explicitly rather than depending on the autoinitialization to do it for me.
↧
Forum Post: RE: Reference code of ADC
hi Richard, Thank you for reply, can i read my data this type in continuous mode ? I used e2 studio for DK S7G2 board. err = g_adc.p_api->open(g_adc.p_ctrl, g_adc.p_cfg); if (SSP_SUCCESS != err) { while(1); } err = g_adc.p_api->scanCfg(g_adc.p_ctrl, g_adc.p_channel_cfg); if (SSP_SUCCESS != err) { while(1); } while(1) { /** Start the ADC conversion*/ err = g_adc.p_api->scanStart(g_adc.p_ctrl); if (SSP_SUCCESS != err) { while(1); } /** Only update every 10 ms. */ tx_thread_sleep(10); /** Read the raw ADC value. */ g_adc.p_api->read(g_adc.p_ctrl, ADC_REG_CHANNEL_0, &adc_data1[index]); if (SSP_SUCCESS != err) { while(1); } g_adc.p_api->read(g_adc.p_ctrl, ADC_REG_CHANNEL_1, &adc_data2[index]); if (SSP_SUCCESS != err) { while(1); } g_adc.p_api->read(g_adc.p_ctrl, ADC_REG_CHANNEL_2, &adc_data3[index]); if (SSP_SUCCESS != err) { while(1); } g_adc.p_api->read(g_adc.p_ctrl, ADC_REG_CHANNEL_3, &adc_data4[index]); if (SSP_SUCCESS != err) { while(1); } g_adc.p_api->read(g_adc.p_ctrl, ADC_REG_TEMPERATURE, &adc_data[index]); if (SSP_SUCCESS != err) { while(1); }
↧
↧
Forum Post: RE: GDB action 'read memory', has failed with error code, 0xffffffff
yes exactly like what you mentioned a 10 seconds timeout , i have 2 USB connected and i am using Windows 10.
↧
Forum Post: MODULATION NEAR 0%-100% DUTY IN TRIANGLE WAVE COMPLEMENTARY PWM WITH AUTOMATIC DEAD TIME
MODULATION NEAR 0%-100% DUTY IN TRIANGLE WAVE COMPLEMENTARY PWM: in the old Renesas micro SH7044 I need to replace when one output is at 0% and the complementary output have (2*dead_time) off time, is also possible to linear modulate this off time until 0. I can not find this possibility in Synergy! is It possibile that is feature has been lost? does this possibility exist in Synergy?
↧
Forum Post: RE: Working application failes when adding ThreadX source
Renesas e² studio Version: 6.2.1 Build Id: R20180629-0802 Renesas Synergy Version: 6.2.1.v20180628-1510 Regarding the call stack I believe this is what you ask for.. NetX_Duo_WebServer_SK_S7G2.elf [1] Thread #1 1 (single core) (Suspended : Breakpoint) NMI_Handler() at bsp_group_irq.c:143 0x26034 () at 0xfffffffd _tx_thread_schedule() at tx_thread_schedule.c:292 0x8b92 _tx_initialize_kernel_enter() at tx_initialize_kernel_enter.c:182 0x9674 Thread #15 1014 (single core - HTTP Server Thread [WaitingSemaphore RC:2]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 fx_media_init_function0() at common_data.c:394 0x26f74 g_common_init() at common_data.c:745 0x27334 g_hal_init() at hal_data.c:5 0x27350 tx_startup_common_init() at main.c:125 0x27530 http_server_thread_func() at http_server_thread.c:80 0x27448 Thread #16 1015 (single core - Thread0 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread0_func() at thread0.c:43 0x2761c _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #17 1016 (single core - Thread1 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread1_func() at thread1.c:45 0x276c8 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #18 1017 (single core - Thread2 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread2_func() at thread2.c:36 0x27744 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #19 1018 (single core - Thread3 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread3_func() at thread3.c:43 0x277e4 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #20 1019 (single core - Thread4 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread4_func() at thread4.c:36 0x27860 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #21 1020 (single core - Thread5 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread5_func() at thread5.c:36 0x278dc _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #22 1021 (single core - Thread6 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread6_func() at thread6.c:43 0x2797c _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #23 1022 (single core - Thread7 [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 thread7_func() at thread7.c:36 0x279f8 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #24 1023 (single core - USB Thread [WaitingSemaphore RC:1]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 tx_startup_common_init() at main.c:110 0x27508 usb_thread_func() at usb_thread.c:43 0x27a98 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #25 1024 (single core - ux_host_stack_enum_thread [Ready RC:34]) (Suspended : Signal : SIGINT:Interrupt) g_ux_pool_memory() at 0x1ffe915a __Lock_Lookup_Size() at 0x200 Thread #26 1025 (single core - ux_host_stack_hcd_thread [WaitingSemaphore RC:2134]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_semaphore_get() at tx_semaphore_get.c:258 0xad6c _txe_semaphore_get() at txe_semaphore_get.c:179 0xcb74 _ux_utility_semaphore_get() at ux_utility_semaphore_get.c:131 0x2f448 _ux_host_stack_hcd_thread_entry() at ux_host_stack_hcd_thread_entry.c:115 0x2fb12 _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff Thread #27 1026 (single core - ux_storage_thread [Sleeping RC:2]) (Suspended : Signal : SIGINT:Interrupt) __get_ipsr_value() at tx_port.h:333 0xbb18 _tx_thread_system_return_inline() at tx_port.h:419 0xbb18 _tx_thread_system_suspend() at tx_thread_system_suspend.c:615 0xbb18 _tx_thread_sleep() at tx_thread_sleep.c:233 0xb660 _ux_utility_delay_ms() at ux_utility_delay_ms.c:94 0x2f0bc _ux_host_class_storage_thread_entry() at ux_host_class_storage_thread_entry.c:135 0x30b7c _tx_thread_shell_entry() at tx_thread_shell_entry.c:166 0xb550 0xffffffff
↧