Quantcast
Channel:
Viewing all 59170 articles
Browse latest View live

Forum Post: RE: R8C, UART1 receive interrupt stops firing.

$
0
0
Thank you for the reply and I agree with you. But the truth is that we cannot change other tasks because some reasons. Actually, we use single time DMA for UART receive, 5 bytes data will trigger a DMA interrupt. In the DMA interrupt, we will re-enable the DMA. But after 1 or 2 days running, no DMA interrupt occurs! We checked the DMA registers, anything is OK. Then we checked the UART registers, overrun happened. And DMA worked back to normal after we read the UART receive data register. What I cannot understand is: 1. overrun can only be cleared by disable and then re-enable UART, I read it in the datasheet. Read UART receive data register can only clear frame error and parity error. So why read UART receive data register can activate the UART. 2. I simulate a case to generate UART overrun, but DMA worked fine. Even a overrun happens, it always request DMA. It seems that overrun may result to UART stops, but not always. And overrun cannot generate any interrupt, I hate it.

Forum Post: RE: Error in stdlib.h

$
0
0
Dear Frank, NC30 compiler used for renesas m16c Standard toolchain.

Forum Post: Problem with SPI initialization on S7GZ SSP 1.2

$
0
0
Dear, I'm trying to use SPI framework on S7G2 platform with SSP 1.2. I configured the g_sf_spi_device in the SSP with driver on r_rspi. When I try to open the device with : g_sf_spi_device0.p_api->open(g_sf_spi_device0.p_ctrl, g_sf_spi_device0.p_cfg); I have the following error : SSP_ERR_IRQ_BSP_DISABLED Stéphane

Forum Post: RE: E8A

$
0
0
What is the problem? Is E8a not recognized by the PC? In this case probably one of the fuses F1/F2 is damaged. Or does E8a not connect to the target hardware? In this case overvoltage in your target hardware probably damaged some of the inline resistors used to limit input current to E8a. E8a has several resistor arrays in the output circuit to the target hardware. These can easily be damaged.

Forum Post: RE: Error in stdlib.h

$
0
0
Where does the second definition of div() come from? This compiles fine: #include void main(void); struct _div_t result; unsigned long dividend=20000; unsigned long divisor=5; void main(void) { result = div(dividend, divisor); }

Forum Post: RE: R8C, UART1 receive interrupt stops firing.

$
0
0
If you have a DMA (I suppose you mean a DTC?) you could use this to read every byte from the UART register and write it to the buffer area. When the buffer is full you get the DTC interrupt. Depending on the nature of your communication you could program a timer as a time out timer in case the distance between 2 data receives becomes to big.

Forum Post: RE: DK-S7G2M: Initialization of USB-Mass-Storage-Device kills Network

$
0
0
Hi 4711, I strongly recommend to use priorities at least 5 or lower (i.e. higher number) for user's threads. Moreover, it's suggested that all threads has a different priority. In ThreadX, the thread can bu resumed up to one tick earlier than requested, for example tx_thread_sleep(1) can "almost immediately" return. Please see ThreadX User's Manual for more details. Your application has tx_thread_sleep(nx_ms_to_ticks(1)); in some places, these threads can starve other threads and NetX IP Internal Thread or internal USBX threads may not function as expected. USBX Device Stack User Guide has section "Multiple SCSI LUN" - hope this helps. Regards, adboc

Forum Post: RE: Eyther_phy.c and using a new phy.

$
0
0
Thank you adboc, I removed that is it looks like there is more to modify. What Im seeing come back from the device, in the "data" variable in the phyr_read for example is constantly 0xffff. I can scope hte SCL_MDC and SDA_MDIO pins and see what looks like just the read request going out with nothing being returned. Im half thinking maybe the read request is somehow different. Thanks for the info on the soft reset. Matt

Forum Post: RE: Error in stdlib.h

$
0
0
Dear Frank, I can't find out second definition. How to find out? Thanks Regards, dhanash

Forum Post: RE: DK-S7G2M: Initialization of USB-Mass-Storage-Device kills Network

$
0
0
Hi adboc, thank you for your hints. I changed the priorities of Init-Thread to 5 DHCP-Thread to 8 HTTP-Thread to 6 and USB0-Thread to 7 and increased all 1ms-sleeps to at least 2ms. But the behavior of the result is the same as before, unfortunately. No idea, whats still wrong. I've updated the example archive on my first post iof someone wants to test it. The chapter "Multiple SCSI LUN" I'll study in within the next time and will give feedback about the result. Sorry for my bad english, I'm german.

Forum Post: Same SPI channel for two SPI slaves with different Chip selects

$
0
0
I'm using SSP 1.3.3 with DK-S7G2 board. I need to use two (or more) SPI slave devices on SPI1 channel. I've tested one device now, and it's working. Now I need to add another SPI slave on same channel, but different Slave select. Is this possible? I have tried using two SPI framework (shared bus), but while adding HAL driver for second framework, it doesn't show the option for selecting the existing HAL driver, instead only new SPI HAL driver. IS this expected behaviour? If not, what could be wrong?

Forum Post: RE: AMS ENS210 sensor on SK-S7G2

$
0
0
Hi zfeng, to change the slave address please try to use the .slaveAddressSet function: i2c->p_api->slaveAddressSet(i2c->p_ctrl, slaveAddress, I2C_ADDR_MODE_7BIT); Best regards, anper

Forum Post: RE: Error in stdlib.h

$
0
0
I'm sorry if you have no control over the code you write. Could it be that in your application the compiler does not find stdlib.h? If a code uses a function without a proper function prototype the compiler assumes the return value to be int. Do you have warnings/informational messages switched on? Have you tried my main()?

Forum Post: RE: Problem with SPI initialization on S7GZ SSP 1.2

$
0
0
I solved this problem by upgrading to SSP 1.4

Forum Post: RE: E8A

$
0
0
The E8a is not recognized by the pc despite F1 and F2 fuses not damaged !

Forum Post: Framework SPI working but no signal, S7G2 SSP 1.4

$
0
0
Dear, I configured the SSP framework to use SPI as master for write only. The functions open and write return SSP_SUCCESS. But nothing seems to be output on P411 (MOSI), and P412 (RSPCK). Below the configuration :

Forum Post: Interrupt configuration manually

$
0
0
Hello! I would like to configure some Interrupt manually (GPT, I2C, etc.). To do so, I need the names of my interrupt for such functions like: // Sets interrupt priority and initializes vector info NVIC_SetPriority(*p_irq, ipl); //Clear the ISR status R_BSP_IrqStatusClear(event_info.irq); //Clear pending ISR NVIC_ClearPendingIRQ(event_info.irq); //Interrupt has to be enable in the NVIC. NVIC_EnableIRQ(); In my example I'm using a GPT and want to set the values for it. The question is: where can I find the names for the required interrupt? Is there any list of it? I'm using a s124 controller. Also, is there any description of the NVIC and BSP functions available? Thank you for any help! Regards, Gregor

Forum Post: compiler variable optimization

$
0
0
Hi All ! I'm updating a variable (time_out_serial) decreasing it by 1 at each 1 milisecond on a ISR. However when the variable time_out_serial is 0 it does not leave the while loop. I realized that because of the compiler optimization , apparently the compiler does not "know" that eventually the variable time_out_serial will be 0. One solution would be to declare the variable as a volatile, but my question is if it's possible to configure the E2 studio compiler optimization settings, in order to, prevent from declaring the variable as a volatile. I have the part of the code that i'm refering to , right below : send () { while (time_out_serial); } Callback_ISR (timer_callback_args_t *p_args) { time_out_serial--; } Kind regards, Phillipe

Forum Post: RE: executing Halt instruction from RAM

$
0
0
Hello, Please go to Renesas Software sample code download weblink: www.renesas.com/.../r01an2832ej0100_rl78.pdf Download the R01AN2832EJ0100 Rev. 1.00, May 28, 2015 app note and sample code. In r_main.c is the code example showing how to implement the HALT and RET instructions. Regards, MikeC (in r_main.c) /****************************************************************************** * Function Name: R_ExecHighSpeedCRC * Description : Execute a high-speed CRC. * Arguments : none * Return Value : none ******************************************************************************/ void R_ExecHighSpeedCRC(void) { uint8_t crc_func[2U + 1U + 10U]; /* HALT, RET, + 10byte */ ProcPtr CRC_Func; /* The instruction is defined in RAM. */ crc_func[0] = 0x61U; /* HALT(high) */ crc_func[1] = 0xEDU; /* HALT(low) */ crc_func[2] = 0xD7U; /* RET */ crc_func[3] = 0x00U; /* NOP */ crc_func[4] = 0x00U; /* NOP */ crc_func[5] = 0x00U; /* NOP */ crc_func[6] = 0x00U; /* NOP */ crc_func[7] = 0x00U; /* NOP */ crc_func[8] = 0x00U; /* NOP */ crc_func[9] = 0x00U; /* NOP */ crc_func[10] = 0x00U; /* NOP */ crc_func[11] = 0x00U; /* NOP */ crc_func[12] = 0x00U; /* NOP */ /* Execution of function defined in the above-mentioned. */ CRC_Func = (ProcPtr)crc_func; CRC_Func(); } /****************************************************************************** End of function R_ExecHighSpeedCRC ******************************************************************************/

Forum Post: RE: executing Halt instruction from RAM

$
0
0
hi mike, i have calculated high speed CRC, and after calculation when HAlt mode is released i send the result of crc serially over uart, the issue i am facing is when i calculate crc of my hex file using some external tool they does not match. i am using R510FMMG its flash is 128 KB so i am using starting address as 0x0000H and end address as 0x1FFFBH. external tool which i am using is provided with sample code of renesas to calculate the CRC of hex file. can you guide me what may be the issue. thanks
Viewing all 59170 articles
Browse latest View live