Quantcast
Channel:
Viewing all 59170 articles
Browse latest View live

Forum Post: I receive data from UART and I want to display the data on the screen. How can I do this?

$
0
0
Hi Team, How can I send data run time to the screen. For example I receive data from UART and I want to display the data on the screen. So how can I do this? or Is there any other easy way to display the data received from UART on to the screen? Can you please explain this in how many ways this is possible? Any sample example or sample project will help me.

Forum Post: RE: nx_ip_interface_info_get + MAC Address

$
0
0
sorry, small bugfix: Please replace the inline by static. You may optionally make the dez2hex an inline static. Thus: inline static char dez2hex( ULONG val); inline static char dez2hex( ULONG val) { .... and static char *mac2str( ULONG msw, ULONG lsw ); static char *mac2str( ULONG msw, ULONG lsw ) { ...

Forum Post: RE: FileX on SD Card on SK-S7G2 using SDHI1?

$
0
0
Hi toybuilder, The first "thread" shows just currently executed thread the other one is an ordinary entry for a thread. I suppose you're using step into/over/return function, that's why the first entry has slightly different threads than the second one. Could you investigate where exactly FileX failed (supposably somewhere in r_sdmmc driver)? Have you had a chance to see if there is any activity on SDMMC lines? Regards, adboc

Forum Post: RE: Which timer to use in linux kernel module

$
0
0
1. In Linux, interrupts routines always run immediately. So if you have some time sensitive task, you should do it in the interrupt routine. Most drivers only use the interrupt routine to wake up some sleeping kernel task/tread. But like you mentioned, if the CPU is busy and there are many threads, the wake up of the thread may be delayed. If you need deterministic scheduling, maybe you should consider PREEMPT_RT. 2. Yes. If you are using the 4.9 or 4.14 BSP, buy default the OSTM timers are using for the kernel. The MTU2 timer is not used anymore by the kernel. I suggest using the MTU2 timer (personally, that is what I do, I write to the registers directly in my kernel module). 3. OSTM timers are used for kernel tick and user application timers. See 'rza_linux-4.9_bsp/doc/testing/ostm.txt' and 'nanosleep.c' for how applications use these kernel timers. 4. The answer is "clocksource" and "clockevent" timers. There are 2 OSTM channels in RZ/A1. One is used as clocksource, the other is used as clockevent. The clocksource is used to keep track of global time (like jiffy timer). The clockevent is used to set timer interrupts for better accuracy by user application programs.

Forum Post: RE: How can I get a feedback to know that the screen has been painted?

Forum Post: __FILE__ expansion to the just the file name ?

$
0
0
In Assert() macro there is __FILE__ which expands to full path. As it should do. But I like to have only the filename (without the full path). This will save a lot of precious space. To avoid confusion, it needs to be done at compile time, otherwise it save no memory space.

Forum Post: RE: I receive data from UART and I want to display the data on the screen. How can I do this?

$
0
0
Hello Tiger, the solution depends on the type and size of the data which you receive. If you receive a short text data, with a .read() function call, similar to the following one: g_sf_comms1.p_api->read(g_sf_comms1.p_ctrl, p_dest, bytes, timeout); the received data, p_dest, could be displayed in the GUI as a text prompt: gx_prompt_text_set(&window1.window1_prompt, (GX_CHAR *)p_dest); Please give some more datails about your case scenario, if you need more specific solution. Best regards, anper

Forum Post: RE: How can I get a feedback to know that the screen has been painted?

$
0
0
Hi Amaia, How are you refreshing widgets? For a flickering issue, you may try to change panel clock division ratio ("TCON - Panel clock division ratio"). According to S5D9 User's Manual (section 58.3.3.2): "This function detects underflows in the graphics data interface block for graphics 1. The SYSCNT_STMON.L1UNDF flag is set to 1 if the graphics data cannot be read from the graphics data interface block (if valid data is not stored in the 4-stage ring buffer). The underflow is cleared as an internal state of graphics 1 on the VS (vertical synchronization) signal assertion of the previous stage. However, to clear the relevant bit in the Status Monitor Register of the system control block, the software must set the associated bit in the Status Clear Register to 1." SF_EL_GX_EVENT_ERROR can happen on display setup or D/AVE initialization. Regards, adboc

Forum Post: RE: I receive data from UART and I want to display the data on the screen. How can I do this?

$
0
0
I would say there are plenty of GuiX examples that present strings, and there some very nice projects that use the UART or the CDC-ACM port for serial input (a PC virtual comm port). Then just merge them together!

Forum Post: RE: I receive data from UART and I want to display the data on the screen. How can I do this?

$
0
0
Hi Anper/larry_c_Mass, Thanks for your immediate reply. use case is like this:- 1. I need to send data from my PC com port to UART of the synergy dev board. It will be around 20 to 25 bytes. how can I display the received data on the screen. Can you please provide any sample example or project where UART and screen or linked for printing the data received from UART. This will help me immensely.

Forum Post: RE: SD on Ch 1 on S7G2 not working on SSP 1.3.3 but worked on SSP 1.2

$
0
0
Hi adboc - I work with Larry. I can confirm that the pin configuration is the same. I traced fx_media_open() from common_data - fx_media_open() -> _fx_media_open() -> SF_EL_FX_BlockDriver() -> SF_Block_Media_SDMMC_Open() -> r_sdmmc_card_identify (). The command_send() function does not return SDMMC_CARD_TYPE_SD or SDMMC_CARD_TYPE_MMC, so it returns SSP_ERR_CARD_INIT_FAILED. We have similar code working on the S7G2 successfully. In looking at the s7G2 schematic, you have a tri-state buffer between the S7 and the SD pins, whereas we directly connect. We're a little confused in looking at the schematic how your receiving commands back to the S7. Thoughts? Thanks!

Forum Post: RE: SD on Ch 1 on S7G2 not working on SSP 1.3.3 but worked on SSP 1.2

Forum Post: RE: Tutorial : Ultrasonic Distance Sensor for S5D9 IOT.

$
0
0
Michael, thanks for building this tutorial. I ordered these Elegoo HC-SR04 Ultrasonic Distance Sensors to go through your tutorial with the board from the AE-CLOUD1 kit (same board that is in the S5D9 IoT Fast Prototyping Kit)

Forum Post: Why not entering DeepStandby?

$
0
0
Hi, S7G2 and SSP 1.1.3 and can not upgrade at this time. The following routine used to work for me to enter DeepStandby. It no longer does. The PCB has changed, but not in any areas that I see relevent to DeepStandby. The TP_TOGGLE()'s merely toggle a GPIO pin. Except for the toggling of TP3 at entry to this routine, the only toggling that takes place is that of TP2 each iteration of the loop in this routine. In short, I'm not entering DeepStandby, but none of the HAL g_lpm calls fail and return err != SSP_SUCCESS. How can I determine why g_lpm_lowPowerMode.p_api->lowPowerModeEnter() fails? Steve PS - sorry about the lack of format below. I attempted to use use the source tool, but clearly I failed. static void DeepStandbyNow() { ssp_err_t err; uint32_t wupen_preSleep = 0; TP_TOGGLE(3); TP_TOGGLE(3); err = g_lpm_lowPowerMode.p_api->init(g_lpm_lowPowerMode.p_cfg); if (err != SSP_SUCCESS) { TP_TOGGLE(2); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(2); __BKPT(0); } // g_lpm_lowPowerMode.p_api->deepStandbyCancelRequestEnable(LPM_DEEP_STANDBY_IRQ11_DS, LPM_CANCEL_REQUEST_EDGE_FALLING); g_lpm_lowPowerMode.p_api->deepStandbyCancelRequestEnable(LPM_DEEP_STANDBY_IRQ13_DS, LPM_CANCEL_REQUEST_EDGE_RISING); g_lpm_lowPowerMode.p_api->wupenGet( &wupen_preSleep ); g_lpm_lowPowerMode.p_api->wupenSet(0); // wupen_preSleep |= (1 wupenSet(wupen_preSleep); while (1) { TP_TOGGLE(2); TP_TOGGLE(2); err = g_lpm_lowPowerMode.p_api->lowPowerCfg( LPM_LOW_POWER_MODE_DEEP, // lpm_low_power_mode_t LPM_OUTPUT_PORT_ENABLE_RETAIN, // lpm_output_port_enable_t LPM_POWER_SUPPLY_DEEPCUT0, // lpm_power_supply_t LPM_IO_PORT_NO_CHANGE); // LPM_IO_PORT_NO_CHANGE if (err != SSP_SUCCESS) { TP_TOGGLE(2); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(2); __BKPT(0); } err = g_lpm_lowPowerMode.p_api->lowPowerModeEnter(); if (err != SSP_SUCCESS) { TP_TOGGLE(2); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(3); TP_TOGGLE(2); __BKPT(0); } tx_thread_sleep (10); } } // DeepStandbyNow()

Forum Post: RE: Why not entering DeepStandby?

$
0
0
Background: the routine listed above is in a thread dedicated to entering low power mode. Upon thread startup, which is automatic, the entry routine calls the following. Commenting out the line that executes the core functionality of the routine did not make a difference. (IE the //SJG line) static void DeepStandbyCheck(void) { /* Check if the device has just left Deep Software Standby mode. */ //SJG if (1U == R_SYSTEM->RSTSR0_b.DPSRSTF) { uint16_t current_prcr_value; /* Clear the Deep Software Standby Reset flag */ R_SYSTEM->RSTSR0_b.DPSRSTF = 0U; /* Gain access to Deep Software Standby registers to clear * the interrupt enable and flag for IRQ11 and RTC Interval. * This was the IRQ used to wake the device. * The Deep Software Standby registers are write protected. */ /* Read the current value */ current_prcr_value = R_SYSTEM->PRCR; /* Set the password of A5xx and set bit 2 */ current_prcr_value |= (PRCR_KEY PRCR = current_prcr_value; R_SYSTEM->DPSIER1_b.DIRQ13E = 0U; // P0_9 (accelerometer) IRQ13-DS do { R_SYSTEM->DPSIFR1_b.DIRQ13F = 0U; } while (R_SYSTEM->DPSIFR1_b.DIRQ13F != 0U); * In this example "Maintain the IO port states" is selected * so clear the IOKEEP bit. */ R_SYSTEM->DSPBYCR_b.IOKEEP = 0U; /* Turn register protect back on */ current_prcr_value &= (uint16_t)~PRCR_ACCESS; current_prcr_value |= PRCR_KEY PRCR = current_prcr_value; } } // DeepStandbyCheck()

Forum Post: HAL Flash API: why write with uint32, read with uint8?

$
0
0
Trying to use Flash module to store string data (ASCII characters) into the data flash and running into problems... Code: I've set up an char array "ascwrite" which is then filled with 0-9 then A,B,C . In other words "ascwrite" is filled with 30h, 31h, 32h, etc. Next I took the Flash write demo project (see R11AN0087EU0101 ) and modified it: instead of writing 0xAAAAAAAA into every byte as the demo does, I want to write "ascwrite" into the DF. I tried two ways of filling the "write" array: First I tried-- for(j=0;j<64;j++) { outstring=(uint32_t)(ascwrite[j]); write[j] = outstring; } where outstring and the 'write' array are both uint32_t. Upon writing and then reading the data back out I get: 30 0 0 0 31 0 0 0 32 0 0 0 33 0 0 0 34 0 0 0 35 0 0 0 36 0 0 0 37 0 0 0 38 0 0 0 39 0 0 0 41 0 0 0 42 0 0 0 43 0 0 0 44 0 0 0 45 0 0 0 46 0 0 0 which looks like the 32 bit write is putting my data in the first position and then putting \0 in the next 3 bytes. To test this I modified the filling of the 'write' array to repeat the byte so each uint32 element in the array had the byte bit-shifted into all 4 bytes: for(j=0;j<64;j++) { outstring = (uint32_t)(ascwrite[j]) << 24 | (uint32_t)(ascwrite[j]) << 16 | (uint32_t)(ascwrite[j]) << 8 | (uint32_t)(ascwrite[j]); write[j] = outstring; } Now reading out the data shows: 30 30 30 30 31 31 31 31 32 32 32 32 33 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 37 37 37 37 38 38 38 38 39 39 39 39 41 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44 45 45 45 45 46 46 46 46 Which is semi-expected.... but begs the question(s), do I need to write 4 bytes at a time, filling each uint_32 with sequential data (four array elements)? This makes no sense. Moreover, it makes one wonder: other than some internal configuration issue, why do we write 32 bits but only read 8? Which of the 32 write bits are important (what do the other 24 bits do or where do the other 24 bits go?)? If this an endian issue it is not clear how. This seems much more complex than it should be-- so I'm assuming I'm doing something wrong. Are there any examples that show more detailed write process, other than a fixed byte?

Forum Post: RE: I2C SSP_ERR_IN_USE when I set optimization level to 02. Why?

$
0
0
Hi Adboc, I have downloaded SSP ver 1.3.3. It has the same issue with r_iic driver like SSP ver 1.3.0. For r_sci_i2c driver or framework, both speed modes have no issue. Below is the summary table. Hope Renesas team examine their driver design and improve their future releases. Best regards, Michael

Forum Post: RE: Tutorial : Ultrasonic Distance Sensor for S5D9 IOT.

$
0
0
Have fun! They are pretty accurate sensors. Michael

Forum Post: RE: I2C SSP_ERR_IN_USE when I set optimization level to 02. Why?

$
0
0
Dear Renesas development team, I love using i2c. It is my favorite bus. I love using what Renesas offers in their software (SSP). I want to know what Renesas team would recommend here (iic vs sci_i2c port and driver vs framework). I have all these choices for my project using the S5D9 IOT board. What is the difference between the r_sci_i2c driver and the r_iic driver that the sci driver is not having this issue? How is the r_iic framework able to avoid the problem the r_iic driver has because I think that they may use some common code? Thank you so much if you could share with me some valuable insight and guidance. Appreciate your comments. Best regards, Michael

Forum Post: RE: M16C Simulator

$
0
0
Hi JH, Were you able to use the simulator already? Have you tried nc30wa.hrf? JB RenesasRulz Forum Moderator https://renesasrulz.com/ https://academy.renesas.com/ https://en-us.knowledgebase.renesas.com/
Viewing all 59170 articles
Browse latest View live