Not applicable
Jan 11, 2016
10:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 11, 2016
10:26 AM
2 Replies
Jan 11, 2016
10:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 11, 2016
10:32 PM
Hello,
With the PRNG XMC lib, it is quite easy.
The PRNG configuration needs to be defined first:
And after the PRNG is initialized with the defined configuration, the random data can be read.
The file "xmc_prng.h" must be included of course.
Regards,
Min Wei
With the PRNG XMC lib, it is quite easy.
The PRNG configuration needs to be defined first:
/* PRNG configuration */
XMC_PRNG_INIT_t prng_config =
{
.block_size = XMC_PRNG_RDBS_WORD,
.key_words = 5
};
And after the PRNG is initialized with the defined configuration, the random data can be read.
/* Initialize PRNG */
XMC_PRNG_Init(&prng_config);
/* Read into a variable */
random_data = XMC_PRNG_GetPseudoRandomNumber();
The file "xmc_prng.h" must be included of course.
Regards,
Min Wei
Not applicable
Jul 17, 2016
04:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 17, 2016
04:12 PM
it seems that the DAC of XMC4500 can be used for the same purpose. However, there is so sample code about this. The documentation is also very limited in the reference manual.
chismo wrote:
Hello,
With the PRNG XMC lib, it is quite easy.
The PRNG configuration needs to be defined first:
/* PRNG configuration */
XMC_PRNG_INIT_t prng_config =
{
.block_size = XMC_PRNG_RDBS_WORD,
.key_words = 5
};
And after the PRNG is initialized with the defined configuration, the random data can be read.
/* Initialize PRNG */
XMC_PRNG_Init(&prng_config);
/* Read into a variable */
random_data = XMC_PRNG_GetPseudoRandomNumber();
The file "xmc_prng.h" must be included of course.
Regards,
Min Wei